Class RedisConsumer
Batch mode of the Redis stream consumer (batching=true, XREAD/XGROUP), on the core batch contract: the
consumer collects up to maxBatchMessages entries, runs them through the route once and settles them once.
With a consumer group and ackMode=manual, success acknowledges every entry in one XACK; a failure applies the
rule of a failed single entry to each: it stays pending, and streamClaimMinIdleMs claims it again. Entries
pending for that long are taken into a batch first, as single mode processes them first. A batch the consumer stops
on stays pending too. Without a group the consumer's own position moves past every entry it reads, a failed batch
included, as single mode does.
public sealed class RedisConsumer : DrainableConsumer, IConsumer
Inheritance
Implements
Inherited Members
Properties
ConsumerEndpoint
The endpoint this consumer is attached to.
protected override IEndpoint ConsumerEndpoint { get; }
ConsumerName
Display name for logging (e.g. "kafka:orders", "file:/tmp/in").
protected override string ConsumerName { get; }
Methods
OnStarting(CancellationToken)
Everything a message depends on is in place before returns: the pub/sub
protected override Task OnStarting(CancellationToken ct)
RunAsync(CancellationToken, CancellationToken)
Main consumer loop. Receives pollCt (stop accepting new work)
protected override Task RunAsync(CancellationToken pollCt, CancellationToken processingCt)
Constructors
RedisConsumer(RedisEndpoint, IProcessor, RedisEndpointOptions)
Creates a Redis consumer.