Class SequencerProducerBehavior
- Namespace
- Silverback.Messaging.Sequences
- Assembly
- Silverback.Integration.dll
Uses the available implementations of ISequenceWriter to set the proper headers and split the published message or messages set to create the sequences.
public class SequencerProducerBehavior : IProducerBehavior, IBrokerBehavior, ISorted
- Inheritance
-
SequencerProducerBehavior
- Implements
- Inherited Members
Remarks
A sequence is a set of messages that are handled as a single unit of work. A sequence could be used to group all chunks belonging to the same source message, all messages belonging to the same data set or to implement batch processing.
Constructors
SequencerProducerBehavior(IEnumerable<ISequenceWriter>)
Initializes a new instance of the SequencerProducerBehavior class.
public SequencerProducerBehavior(IEnumerable<ISequenceWriter> sequenceWriters)
Parameters
sequenceWritersIEnumerable<ISequenceWriter>The ISequenceWriter implementations to be used.
Properties
SortIndex
Gets the sort index.
public int SortIndex { get; }
Property Value
Methods
HandleAsync(ProducerPipelineContext, ProducerBehaviorHandler, CancellationToken)
Process, handles or transforms the message being produced.
public ValueTask HandleAsync(ProducerPipelineContext context, ProducerBehaviorHandler next, CancellationToken cancellationToken)
Parameters
contextProducerPipelineContextThe context that is passed along the behaviors pipeline.
nextProducerBehaviorHandlerThe next behavior in the pipeline.
cancellationTokenCancellationTokenThe cancellation token that can be used to cancel the operation.