Table of Contents

Class MqttBatchChunkingGuardConsumerBehavior

Namespace
Silverback.Messaging.Consuming
Assembly
Silverback.Integration.MQTT.dll

Rejects the chunked messages consumed by a client with batch processing enabled. MQTT can't seek, so the chunks are replayed from memory and chunking can't be combined with batch processing.

public class MqttBatchChunkingGuardConsumerBehavior : IConsumerBehavior, IBrokerBehavior, ISorted
Inheritance
MqttBatchChunkingGuardConsumerBehavior
Implements
Inherited Members

Remarks

The behavior runs after the TransactionHandlerConsumerBehavior, so that the error policies apply, and before the RawSequencerConsumerBehavior, so that the chunk sequence isn't started.

Constructors

MqttBatchChunkingGuardConsumerBehavior()

public MqttBatchChunkingGuardConsumerBehavior()

Properties

SortIndex

Gets the sort index.

public int SortIndex { get; }

Property Value

int

Methods

HandleAsync(ConsumerPipelineContext, ConsumerBehaviorHandler, CancellationToken)

Process, handles or transforms the message being consumed.

public ValueTask HandleAsync(ConsumerPipelineContext context, ConsumerBehaviorHandler next, CancellationToken cancellationToken)

Parameters

context ConsumerPipelineContext

The context that is passed along the behaviors pipeline.

next ConsumerBehaviorHandler

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.