Skip to content

NativeAck endpoint mode for Redis Streams #4046

Description

@jeremydmiller

Adopter issue from the #3715 triage. Cheapest of the six adopters — start here.

Why Redis Streams qualifies

Verified against RedisStreamListener.CompleteAsync (src/Transports/Redis/Wolverine.Redis/Internal/RedisStreamListener.cs:224): the ack is StreamAcknowledgeAsync(streamKey, consumerGroup, entryId), keyed off an entry id carried in a header on the envelope itself. That is exactly the property EndpointMode.NativeAck needs — the delivery identity travels with the envelope, so it can be settled out of order from an arbitrary worker thread after the handler finishes.

Redis has no lease clock. The pending-entries list plus XAUTOCLAIM is the redelivery mechanism, so unlike SQS/ASB/Pub/Sub/NATS there is nothing to renew while an envelope waits in a partition lane. That is what makes this the cheapest adoption, and why it is the best transport to prove the shape on before the lease-based ones.

Work

  1. protected override bool supportsNativeAck => true; on RedisStreamEndpoint.
  2. Mode-default tuning: the read batch size is the prefetch equivalent here. It must cover every lane that can be busy at once — partition slots when group-partitioned, otherwise MaxDegreeOfParallelism. See RabbitMqQueue.PreFetchCount's NativeAck arm for the shape.
  3. Confirm DeleteOnAck behaves sanely under out-of-order settlement.
  4. Flip this transport's line in the release-gate test from the Consider NativeAck endpoint mode support for other messaging transports #3715 triage.
  5. Transport docs page: which modes the Redis transport supports.

Acceptance

Parent: #3715. Mode: #3708.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions