Show / Hide Table of Contents

    Interface IBehavior

    Can be used to build a custom pipeline, plugging some functionality into the IPublisher.

    Namespace: Silverback.Messaging.Publishing
    Assembly: Silverback.Core.dll
    Syntax
    public interface IBehavior

    Methods

    HandleAsync(IPublisher, object, MessageHandler, CancellationToken)

    Process, handles or transforms the messages being published via the message bus.

    Declaration
    ValueTask<IReadOnlyCollection<object?>> HandleAsync(IPublisher publisher, object message, MessageHandler next, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    IPublisher publisher

    The IPublisher that is publishing the message.

    object message

    The message being published.

    MessageHandler next

    The next behavior in the pipeline.

    CancellationToken cancellationToken

    The CancellationToken that can be used to cancel the operation.

    Returns
    Type Description
    ValueTask<IReadOnlyCollection<object>>

    A ValueTask<TResult> representing the asynchronous operation. The task result contains the result values (if any).

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini