Class KafkaOffsetStoreConsumerBehavior
- Namespace
- Silverback.Messaging.Consuming.KafkaOffsetStore
- Assembly
- Silverback.Integration.Kafka.dll
Creates the KafkaOffsetStoreScope and ensures that the offsets are being stored to the client side offset store (if configured), when the consumer is committed after processing the message and when the error policies skip or move it.
public class KafkaOffsetStoreConsumerBehavior : IConsumerBehavior, IBrokerBehavior, ISorted
- Inheritance
-
KafkaOffsetStoreConsumerBehavior
- Implements
- Inherited Members
Remarks
It runs right after the TransactionHandlerConsumerBehavior, since the message can fail (e.g., when it cannot be deserialized) or be committed without being processed (e.g., a duplicated chunk) before reaching the subscribers.
Constructors
KafkaOffsetStoreConsumerBehavior()
public KafkaOffsetStoreConsumerBehavior()
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.