Expand description
§flusso-queue-core
A generic work-queue abstraction for the sync pipeline — domain-agnostic, so the backend swaps without touching pipeline code.
§Quick reference
| Item | Role |
|---|---|
Producer | Publishes work items |
Consumer | Receives them, one Delivery at a time |
Delivery | A received item plus its AckHandle |
AckHandle | Confirms (or returns) a delivery — ack / nack |
Generic over the payload T, so it depends on neither the source, the sink, nor the engine. Both backends drive the same engine loop: recv → process → ack.
The point of the abstraction is a swappable backend:
- In-process
tokiochannels (seequeue-channel) for single-node runs. Acking is a no-op there — durability comes from the source (the replication slot), and the bounded channel gives backpressure. - A durable broker (e.g. NATS JetStream) later, where
AckHandle::ackbecomes a real server acknowledgement and the queue itself is the durability boundary for the work pipeline.
ℹ️ Info — because
AckHandlemodels the ack identically, the engine loop is unchanged whichever backend backs it; only the durability guarantee shifts.
Structs§
- Delivery
- A received item paired with the handle that confirms or returns it.
Enums§
- Queue
Error - Why a queue operation failed.
Traits§
- AckHandle
- Confirms or returns a single delivery. Backend-specific: a no-op for in-memory channels, a server acknowledgement for a durable broker.
- Consumer
- Pulls work items from a queue for processing.
- Producer
- Publishes work items onto a queue. Cloneable backends let many producers share one queue.
Type Aliases§
- Result
- Result alias for queue operations.