Skip to main content

Crate queue_channel

Crate queue_channel 

Source
Expand description

§flusso-queue-channel

An in-process work queue over a bounded tokio mpsc channel.

§At a glance

Constructorchannel(capacity) → (ChannelProducer, ChannelConsumer)
Producercloneable — publish from many tasks
Consumersingle — one per queue
Backpressurepublish waits when the channel is full
Closedrains and closes once every producer is dropped
Ackno-op (nothing to make durable in memory)

§How it works

channel returns a cloneable ChannelProducer and a single ChannelConsumer. The bound gives backpressure — publishing waits when the channel is full — and the queue closes and drains once every producer is dropped.

Acknowledgement is a no-op: an in-memory channel has nothing to make durable. Redelivery for the change pipeline comes from the source, not the channel — the replication slot only advances once work is confirmed downstream. The AckHandle surface is honored anyway, so the same engine loop runs unchanged against a durable backend later.

Structs§

ChannelConsumer
The consuming half — a single consumer (clone the producer, not this).
ChannelProducer
The publishing half. Clone it to publish from many tasks.

Functions§

channel
Create a bounded in-process queue with room for capacity pending items.