pub struct KafkaTestSubscriber { /* private fields */ }Expand description
In-process subscriber on one topic name.
Yielded messages settle like the routing contract expects: ack finalizes, nack(true)
re-enqueues to this same subscription, nack(false) drops. The real transport’s
committed-position semantics (holes, watermarks, redelivery on rebalance) are deliberately
not simulated.
Implementations§
Trait Implementations§
Source§impl Debug for KafkaTestSubscriber
impl Debug for KafkaTestSubscriber
Source§impl Drop for KafkaTestSubscriber
impl Drop for KafkaTestSubscriber
Source§impl Subscriber for KafkaTestSubscriber
impl Subscriber for KafkaTestSubscriber
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 injected deliveries; never yields an error.
§Cancel safety
Cancel safe and re-enterable: the receiver is polled in place, so dropping the returned
stream loses nothing and stream can be called again.
Source§type Message = KafkaTestMessage
type Message = KafkaTestMessage
The message type yielded by this subscriber.
Source§type Error = KafkaError
type Error = KafkaError
The error type yielded by the stream when delivery fails.
Auto Trait Implementations§
impl Freeze for KafkaTestSubscriber
impl RefUnwindSafe for KafkaTestSubscriber
impl Send for KafkaTestSubscriber
impl Sync for KafkaTestSubscriber
impl Unpin for KafkaTestSubscriber
impl UnsafeUnpin for KafkaTestSubscriber
impl UnwindSafe for KafkaTestSubscriber
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more