Class OutboundRouterBehavior
- Namespace
- Silverback.Messaging.Producing.Routing
- Assembly
- Silverback.Integration.dll
Routes the messages to the producer by wrapping them in an IOutboundEnvelope<TMessage> that is republished to the bus.
public class OutboundRouterBehavior : IBehavior, ISorted
- Inheritance
-
OutboundRouterBehavior
- Implements
- Inherited Members
Constructors
OutboundRouterBehavior(IMessageWrapper, IProducerCollection)
Initializes a new instance of the OutboundRouterBehavior class.
public OutboundRouterBehavior(IMessageWrapper messageWrapper, IProducerCollection producers)
Parameters
messageWrapperIMessageWrapperThe IMessageWrapper.
producersIProducerCollectionThe IProducerCollection.
Properties
SortIndex
Gets the sort index.
public int SortIndex { get; }
Property Value
Methods
HandleAsync(IPublisher, object, MessageHandler, CancellationToken)
Process, handles or transforms the messages being published via the message bus.
public ValueTask<IReadOnlyCollection<object?>> HandleAsync(IPublisher publisher, object message, MessageHandler next, CancellationToken cancellationToken)
Parameters
publisherIPublisherThe IPublisher that is publishing the message.
messageobjectThe message being published.
nextMessageHandlerThe next behavior in the pipeline.
cancellationTokenCancellationTokenThe 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).