Table of Contents

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

sequenceWriters IEnumerable<ISequenceWriter>

The ISequenceWriter implementations to be used.

Properties

SortIndex

Gets the sort index.

public int SortIndex { get; }

Property Value

int

Methods

HandleAsync(ProducerPipelineContext, ProducerBehaviorHandler, CancellationToken)

Process, handles or transforms the message being produced.

public ValueTask HandleAsync(ProducerPipelineContext context, ProducerBehaviorHandler next, CancellationToken cancellationToken)

Parameters

context ProducerPipelineContext

The context that is passed along the behaviors pipeline.

next ProducerBehaviorHandler

The next behavior in the pipeline.

cancellationToken CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

ValueTask

A ValueTask representing the asynchronous operation.