Skip to main content

Module stream

Module stream 

Source
Expand description

Builder describing one Redis Streams subscription.

A subscription always reads through a consumer group. Three read modes are selected by constructor, never by a runtime flag, because they return disjoint message sets:

  • RedisStream::new reads fresh entries off the tail (XREADGROUP > ...).
  • RedisStream::reclaim reads stale pending entries another consumer never acked (XAUTOCLAIM, idle at least min_idle) - the crash-recovery path.
  • RedisStream::claiming reads both in one call (XREADGROUP ... CLAIM, Redis 8.4 and later): stale pending entries first, then fresh ones, each with its idle time and delivery count.

Inferring the mode from a numeric parameter would be a footgun (a stray idle timeout could silently stop fresh delivery), so the mode is part of the constructor name. On a server older than 8.4, recovery is a separate reclaim subscriber beside the new one on the same group: “two handlers per group”.

Modules§

prelude
The core prelude plus everything a Redis Streams service writes.

Structs§

Publish
This form’s publish policy, RedisPublish, under the mount-site name every form gives its own. The declaration half of the stream publisher: pure policy, constructible anywhere.
RedisStream
Describes one Redis Streams subscription against a ConnectedRedisBroker.
TransactionalPublish
The same policy under the transactional mount-site name: a stream publisher buffers on the handle and owns transactions as it is, so the plain policy is the transactional one and there is no second type to transition to. The declaration half of the stream publisher: pure policy, constructible anywhere.

Enums§

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.