pub struct LapinMessage { /* private fields */ }Expand description
One AMQP delivery, settled with the protocol’s native acknowledgement frames.
Settlement mapping:
acksendsbasic.ack.nack(true)sendsbasic.nackwithrequeue = true; the broker redelivers the message (typically to the same queue,redeliveredset).nack(false)sendsbasic.rejectwithrequeue = false; the broker drops the message, or dead-letters it when the queue has a dead-letter exchange.
Replies received through LapinRequester arrive on a no-ack
consumer; settling them is a no-op that always succeeds.
Implementations§
Source§impl LapinMessage
impl LapinMessage
Sourcepub fn exchange(&self) -> &str
pub fn exchange(&self) -> &str
The exchange this message was published to (empty for the default exchange).
Sourcepub fn routing_key(&self) -> &str
pub fn routing_key(&self) -> &str
The routing key the message was published with.
Sourcepub fn redelivered(&self) -> bool
pub fn redelivered(&self) -> bool
Whether the broker marked this delivery as redelivered.
Sourcepub fn delivery_tag(&self) -> u64
pub fn delivery_tag(&self) -> u64
The channel-local delivery tag of this delivery.
Trait Implementations§
Source§impl BuildContext<LapinMessage> for AmqpContext
impl BuildContext<LapinMessage> for AmqpContext
Source§fn build(msg: &LapinMessage) -> Self
fn build(msg: &LapinMessage) -> Self
msg.Source§impl Debug for LapinMessage
impl Debug for LapinMessage
Source§impl IncomingMessage for LapinMessage
impl IncomingMessage for LapinMessage
Source§async fn ack(self) -> Result<(), AckError>
async fn ack(self) -> Result<(), AckError>
Acknowledges the delivery with basic.ack.
§Errors
Returns AckError::Broker when the frame cannot be sent, for example because the
channel closed after the delivery arrived.
§Cancel safety
Not cancel safe: dropping the future after the frame was queued may still acknowledge the message on the broker.
Source§async fn nack(self, requeue: bool) -> Result<(), AckError>
async fn nack(self, requeue: bool) -> Result<(), AckError>
Settles negatively: basic.nack(requeue = true) or basic.reject(requeue = false).
§Errors
Returns AckError::Broker when the frame cannot be sent, for example because the
channel closed after the delivery arrived.
§Cancel safety
Not cancel safe: dropping the future after the frame was queued may still settle the message on the broker.
Source§fn partition_key(&self) -> Option<&[u8]>
fn partition_key(&self) -> Option<&[u8]>
None when the
message carries no key. Read moreSource§fn supports_nack_after(&self) -> bool
fn supports_nack_after(&self) -> bool
nack_after natively. Read more