Expand description
Redis / Valkey broker implementation for RustStream, backed by fred.
This crate implements the RustStream broker contract over Redis Streams: durable consumer
groups with acknowledgement, redelivery, and crash recovery. Subjects are stream keys; a
subscription reads through a consumer group, either off the fresh tail
(RedisStream::new) or reclaiming another consumer’s stale pending entries
(RedisStream::reclaim).
Settlement follows the republish-retry model: ack is XACK, nack(requeue = true) re-appends
a copy to the same stream then acks the original, and nack(requeue = false) acks to drop.
Structs§
- Redis
Broker - A Redis broker handle backed by a
fredconnectionPool. - Redis
List - Describes one list subscription against
crate::RedisBroker. - Redis
List Message - A list-queue delivery. In simple mode
ack/nackare unsupported; in reliable modeackremoves the entry from the processing list andnackeither returns it or drops it. - Redis
List Publisher - Publishes onto a list with
LPUSH, so right-popping consumers see FIFO order. - Redis
List Subscriber - A list-backed work-queue subscription.
- Redis
Message - A Redis Streams delivery, read from a consumer group via
XREADGROUPorXAUTOCLAIM. - Redis
PubSub - Describes one Pub/Sub subscription against
crate::RedisBroker. - Redis
PubSub Message - A Pub/Sub delivery.
ack/nackare unsupported (Pub/Sub has no acknowledgement). - Redis
PubSub Publisher - Publishes Pub/Sub messages with
PUBLISH(classic) orSPUBLISH(sharded). - Redis
PubSub Subscriber - A Pub/Sub subscription backed by a dedicated
fredclient, so its message stream and channel state are isolated from other subscribers and from the publishing pool. - Redis
Publisher - Redis publisher built on a shared
fredconnection pool. Cheap to clone. - Redis
Stream - Describes one Redis Streams subscription against
crate::RedisBroker. - Redis
Subscriber - A Redis Streams subscription bound to a consumer group.
Enums§
- PubSub
Mode - Pub/Sub delivery mode. Defaults to
Classic. - Redis
Error - Errors surfaced by the Redis broker implementation.
- Stream
Start - Where a freshly created consumer group starts reading from. Only consulted when the group does not yet exist; an existing group keeps its own cursor.
Constants§
- PARTITION_
KEY_ HEADER - The well-known header key for per-message routing / partitioning.