Class IdempotentConsumerProcessor
Idempotent consumer processor. Deduplicates exchanges based on a key extracted
from the exchange. Duplicate exchanges are silently skipped.
Usage: wrap the inner pipeline so that duplicate messages (by key) are not processed twice.
The key extractor is a function from to string.
Typical keys: message ID, correlation ID, or a business-specific unique identifier.
public sealed class IdempotentConsumerProcessor : IProcessor
Inheritance
Implements
Methods
Process(IExchange, CancellationToken)
Processes the exchange asynchronously.
public Task Process(IExchange exchange, CancellationToken ct = default)
Constructors
IdempotentConsumerProcessor(IProcessor, IIdempotentRepository, Func<IExchange, string>, bool, ILogger?)
Creates an idempotent consumer processor.