Skip to main content

Crate ruststream_fred

Crate ruststream_fred 

Source
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§

RedisBroker
A Redis broker handle backed by a fred connection Pool.
RedisList
Describes one list subscription against crate::RedisBroker.
RedisListMessage
A list-queue delivery. In simple mode ack / nack are unsupported; in reliable mode ack removes the entry from the processing list and nack either returns it or drops it.
RedisListPublisher
Publishes onto a list with LPUSH, so right-popping consumers see FIFO order.
RedisListSubscriber
A list-backed work-queue subscription.
RedisMessage
A Redis Streams delivery, read from a consumer group via XREADGROUP or XAUTOCLAIM.
RedisPubSub
Describes one Pub/Sub subscription against crate::RedisBroker.
RedisPubSubMessage
A Pub/Sub delivery. ack / nack are unsupported (Pub/Sub has no acknowledgement).
RedisPubSubPublisher
Publishes Pub/Sub messages with PUBLISH (classic) or SPUBLISH (sharded).
RedisPubSubSubscriber
A Pub/Sub subscription backed by a dedicated fred client, so its message stream and channel state are isolated from other subscribers and from the publishing pool.
RedisPublisher
Redis publisher built on a shared fred connection pool. Cheap to clone.
RedisStream
Describes one Redis Streams subscription against crate::RedisBroker.
RedisSubscriber
A Redis Streams subscription bound to a consumer group.

Enums§

PubSubMode
Pub/Sub delivery mode. Defaults to Classic.
RedisError
Errors surfaced by the Redis broker implementation.
StreamStart
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.