Table of Contents

Interface IBehavior

Namespace
Silverback.Messaging.Publishing
Assembly
Silverback.Core.dll

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

public interface IBehavior

Methods

HandleAsync(IPublisher, object, MessageHandler, CancellationToken)

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

ValueTask<IReadOnlyCollection<object?>> HandleAsync(IPublisher publisher, object message, MessageHandler next, CancellationToken cancellationToken)

Parameters

publisher IPublisher

The IPublisher that is publishing the message.

message object

The message being published.

next MessageHandler

The next behavior in the pipeline.

cancellationToken CancellationToken

The CancellationToken that can be used to cancel the operation.

Returns

ValueTask<IReadOnlyCollection<object>>

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