Skip to main content

Module queue

Module queue 

Source
Expand description

Queue / Deque Storage Module

FIFO/LIFO message queue with:

  • Push/Pop from both ends (deque)
  • Consumer groups with acknowledgment
  • Dead-letter queue support
  • Priority queue mode
  • Per-message TTL

Modules§

consumer_group
Consumer Groups for Queue
deque
Core Queue / Deque implementation
mode
presence
Queue consumer presence — issue #742.

Structs§

ConsumerGroup
A consumer group manages message delivery and acknowledgment for a set of consumers reading from the same queue.
ConsumerPresence
One row of presence state, returned by snapshot.
ConsumerPresenceRegistry
Process-local registry of consumer presence. Cheap mutex + small hashmap is the right shape: writes are O(1), reads are a single snapshot copy, and the cardinality is bounded by the operator’s worker fleet (typically dozens, not thousands).
PendingEntry
A pending message awaiting acknowledgment
QueueStore
Core queue data structure supporting FIFO, LIFO, and priority modes.

Enums§

PresenceState
Lifecycle bucket derived from last_seen_age_ms vs the configured ttl_ms. Snapshot consumers (Red UI, virtual tables) read this flag and never re-derive the rule.
QueueMode
QueueSide
Which end of the queue to push/pop from

Constants§

DEFAULT_PRESENCE_TTL_MS
Default heartbeat budget — a consumer is considered active for this long after its last beat. Operators can override per server via the runtime config; the registry itself is agnostic and takes the budget as an argument on every read path.