Class FilterConsumerBehavior
- Namespace
- Silverback.Messaging.Consuming.Filter
- Assembly
- Silverback.Integration.dll
Filters the consumed messages, based on the configured IInboundMessageFilter.
public class FilterConsumerBehavior : IConsumerBehavior, IBrokerBehavior, ISorted
- Inheritance
-
FilterConsumerBehavior
- Implements
- Inherited Members
Remarks
The filtered messages aren't delivered to any subscriber, but they still go through the rest of the pipeline, to be committed (or acknowledged) like the messages that no subscriber handles. In a sequence (e.g. a batch), they don't count toward its length.
Constructors
FilterConsumerBehavior(ISilverbackLogger<FilterConsumerBehavior>)
Initializes a new instance of the FilterConsumerBehavior class.
public FilterConsumerBehavior(ISilverbackLogger<FilterConsumerBehavior> logger)
Parameters
Properties
SortIndex
Gets the sort index.
public int SortIndex { get; }
Property Value
Methods
HandleAsync(ConsumerPipelineContext, ConsumerBehaviorHandler, CancellationToken)
Process, handles or transforms the message being consumed.
public ValueTask HandleAsync(ConsumerPipelineContext context, ConsumerBehaviorHandler next, CancellationToken cancellationToken)
Parameters
contextConsumerPipelineContextThe context that is passed along the behaviors pipeline.
nextConsumerBehaviorHandlerThe next behavior in the pipeline.
cancellationTokenCancellationTokenThe cancellation token that can be used to cancel the operation.