pub enum NatsMessage {
Core(Box<CoreMessage>),
JetStream(Box<JetStreamMessage>),
}Expand description
A NATS delivery. Two flavours: core NATS (no ack) and JetStream (real ack/nack/redelivery).
Both variants are boxed to keep the enum compact; the wrapped async_nats messages are large.
Variants§
Core(Box<CoreMessage>)
A core NATS subject delivery. Acknowledgement is not supported.
JetStream(Box<JetStreamMessage>)
A JetStream pull-consumer delivery with full ack support.
Trait Implementations§
Source§impl Debug for NatsMessage
impl Debug for NatsMessage
Source§impl IncomingMessage for NatsMessage
impl IncomingMessage for NatsMessage
Source§impl Partitioned for NatsMessage
Partitioned lets the workers(N, by_key) runtime feature assign a dispatch lane based on
a well-known message header. NATS has no native partition concept, so the key travels as the
PARTITION_KEY_HEADER header value and the sender is responsible for setting it.
impl Partitioned for NatsMessage
Partitioned lets the workers(N, by_key) runtime feature assign a dispatch lane based on
a well-known message header. NATS has no native partition concept, so the key travels as the
PARTITION_KEY_HEADER header value and the sender is responsible for setting it.
Source§fn partition_key(&self) -> Option<&[u8]>
fn partition_key(&self) -> Option<&[u8]>
Returns the partition key for this item, or
None if the broker should pick a partition.Auto Trait Implementations§
impl !RefUnwindSafe for NatsMessage
impl !UnwindSafe for NatsMessage
impl Freeze for NatsMessage
impl Send for NatsMessage
impl Sync for NatsMessage
impl Unpin for NatsMessage
impl UnsafeUnpin for NatsMessage
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