Class SequencerConsumerBehavior
Uses the available implementations of ISequenceReader to assign the incoming message to the right sequence.
Inherited Members
Namespace: Silverback.Messaging.Sequences
Assembly: Silverback.Integration.dll
Syntax
public class SequencerConsumerBehavior : SequencerConsumerBehaviorBase, IConsumerBehavior, IBrokerBehavior, ISorted
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
| Improve this doc View sourceSequencerConsumerBehavior(IEnumerable<ISequenceReader>, ISilverbackLogger<SequencerConsumerBehavior>)
Initializes a new instance of the SequencerConsumerBehavior class.
Declaration
public SequencerConsumerBehavior(IEnumerable<ISequenceReader> sequenceReaders, ISilverbackLogger<SequencerConsumerBehavior> logger)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ISequenceReader> | sequenceReaders | The ISequenceReader implementations to be used. |
ISilverbackLogger<SequencerConsumerBehavior> | logger | The ISilverbackLogger. |
Properties
| Improve this doc View sourceSortIndex
Gets the sort index.
Declaration
public override int SortIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Methods
| Improve this doc View sourceHandleAsync(ConsumerPipelineContext, ConsumerBehaviorHandler)
Process, handles or transforms the message being consumed.
Declaration
public override async Task HandleAsync(ConsumerPipelineContext context, ConsumerBehaviorHandler next)
Parameters
Type | Name | Description |
---|---|---|
ConsumerPipelineContext | context | The context that is passed along the behaviors pipeline. |
ConsumerBehaviorHandler | next | The next behavior in the pipeline. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
Overrides
| Improve this doc View sourcePublishSequenceAsync(ConsumerPipelineContext, ConsumerBehaviorHandler)
Forwards the new sequence to the next behavior in the pipeline.
Declaration
protected override Task PublishSequenceAsync(ConsumerPipelineContext context, ConsumerBehaviorHandler next)
Parameters
Type | Name | Description |
---|---|---|
ConsumerPipelineContext | context | The context that is passed along the behaviors pipeline. |
ConsumerBehaviorHandler | next | The next behavior in the pipeline. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |