Expand description
Redis list transport: a competing-consumers work queue.
A producer LPUSHes onto the list; consumers pop from the right (BRPOP), so delivery is FIFO
and each entry goes to exactly one consumer (no fan-out, no replay, no groups). Two modes:
- Simple (default) -
BRPOP, at-most-once.ack/nackreportAckError::Unsupported: once popped, the entry is gone, so a crash mid-handler loses it. - Reliable (
RedisList::reliable) -LMOVEthe entry to a per-consumer processing list, thenLREMit onack(at-least-once).nack(requeue = true)returns it to the main list;nack(requeue = false)removes it.
Reliable mode has no native idle/pending tracking, so a consumer that dies after LMOVE but
before settling leaves its entry stranded on the processing list. Opting into a recovery ZSET
with RedisList::recovery_zset (and RedisList::min_idle) starts a watchdog that returns
such orphans to the main list; without it (the default) reliable lists have no orphan recovery,
and Redis Streams (crate::RedisStream) remain the recommended durable path.
Headers travel in a frame around the payload: a binary frame by default, or a readable
codec-serialized envelope when a codec is set with RedisList::codec /
RedisListPublish::codec. Both framings are lossless; the envelope writes a field whose
bytes are valid UTF-8 as text and any other bytes as themselves.
Re-exports§
pub use crate::list::RedisListPublish as Publish;
Modules§
- prelude
- The core prelude, the broker, the
RedisListdescriptor and this form’sPublishpolicy. A list carries no core capability traits.
Structs§
- List
Reader - A list subscription’s reader, as a pipelined subscription holds it: the wire and the entries its last read claimed.
- Redis
List - Describes one list subscription against a
ConnectedRedisBroker. - 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 Publish - The declaration half of the list publisher: envelope codec and key TTL, no connection.
- Redis
List Publisher - Publishes onto a list with
LPUSH, so right-popping consumers see FIFO order: aRedisListPublishpolicy paired with a connection. - Redis
List Subscriber - A list-backed work-queue subscription.