pub struct PulsarMessage { /* private fields */ }Expand description
A message delivered by a PulsarSubscriber.
ack acknowledges; nack(requeue = true) asks the broker to redeliver, which is what
drives the delivery count towards the subscription’s dead-letter policy.
nack(requeue = false) acknowledges: Pulsar has no terminal reject verb - poison routing
belongs to the dead-letter policy, reached by repeated redelivery. The client queues
acknowledgements asynchronously, so Ok means “queued”, not “broker confirmed”.
Implementations§
Trait Implementations§
Source§impl Debug for PulsarMessage
impl Debug for PulsarMessage
Source§impl IncomingMessage for PulsarMessage
impl IncomingMessage for PulsarMessage
Source§async fn ack(self) -> Result<(), AckError>
async fn ack(self) -> Result<(), AckError>
Acknowledges successful processing. Consumes the message handle. Read more
Source§async fn nack(self, requeue: bool) -> Result<(), AckError>
async fn nack(self, requeue: bool) -> Result<(), AckError>
Negatively acknowledges the message. When
requeue is true the broker should
redeliver according to its own retry policy; when false it should drop or dead-letter
the message. Read moreSource§fn partition_key(&self) -> Option<&[u8]>
fn partition_key(&self) -> Option<&[u8]>
Returns the routing key the broker partitioned this message by, or
None when the
message carries no key. Read moreSource§fn supports_nack_after(&self) -> bool
fn supports_nack_after(&self) -> bool
Reports whether this transport can honor
nack_after natively. Read moreSource§impl Partitioned for PulsarMessage
impl Partitioned for PulsarMessage
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.Source§impl Positioned for PulsarMessage
impl Positioned for PulsarMessage
Source§type Position = PulsarPosition
type Position = PulsarPosition
The position type, matching the subscription’s
Seeker::Position.Source§fn position(&self) -> PulsarPosition
fn position(&self) -> PulsarPosition
Returns the position of this delivery; seeking to it redelivers this message.
Auto Trait Implementations§
impl !Freeze for PulsarMessage
impl RefUnwindSafe for PulsarMessage
impl Send for PulsarMessage
impl Sync for PulsarMessage
impl Unpin for PulsarMessage
impl UnsafeUnpin for PulsarMessage
impl UnwindSafe for PulsarMessage
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