pub struct LapinSubscriber { /* private fields */ }Expand description
A consumer on one queue, yielding LapinMessage deliveries.
Created by subscribing a RabbitQueue descriptor (or a bare queue name)
through LapinBroker. The subscriber owns a dedicated channel;
dropping it closes that channel and the broker redelivers whatever was unacknowledged.
Back-pressure: the broker stops pushing once
prefetch unacknowledged deliveries are in flight, so
consuming slower slows the producer side down instead of buffering without bound.
Implementations§
Trait Implementations§
Source§impl Debug for LapinSubscriber
impl Debug for LapinSubscriber
Source§impl Subscriber for LapinSubscriber
impl Subscriber for LapinSubscriber
Source§fn stream(
&mut self,
) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
fn stream( &mut self, ) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
Streams deliveries as they arrive; the stream ends when the consumer is cancelled or the connection closes.
§Cancel safety
Polling is cancel safe (no delivery is lost by dropping the stream between polls), and
the stream can be re-created by calling stream again: deliveries buffer in the
consumer, not in the returned stream.