Skip to main content

Module list

Module list 

Source
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 / nack report AckError::Unsupported: once popped, the entry is gone, so a crash mid-handler loses it.
  • Reliable (RedisList::reliable) - LMOVE the entry to a per-consumer processing list, then LREM it on ack (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 RedisList descriptor and this form’s Publish policy. A list carries no core capability traits.

Structs§

ListReader
A list subscription’s reader, as a pipelined subscription holds it: the wire and the entries its last read claimed.
RedisList
Describes one list subscription against a ConnectedRedisBroker.
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.
RedisListPublish
The declaration half of the list publisher: envelope codec and key TTL, no connection.
RedisListPublisher
Publishes onto a list with LPUSH, so right-popping consumers see FIFO order: a RedisListPublish policy paired with a connection.
RedisListSubscriber
A list-backed work-queue subscription.