Type Alias rdkafka::message::DeliveryResult

source ·
pub type DeliveryResult<'a> = Result<BorrowedMessage<'a>, (KafkaError, BorrowedMessage<'a>)>;
Expand description

The result of a message production.

If message production is successful DeliveryResult will contain the sent message, which can be used to find which partition and offset the message was sent to. If message production is not successful, the DeliveryResult will contain an error and the message that failed to be sent. The partition and offset, in this case, will default to -1 and 0 respectively.

§Lifetimes

In both success or failure scenarios, the payload of the message resides in the buffer of the producer and will be automatically removed once the delivery callback finishes.

Aliased Type§

enum DeliveryResult<'a> {
    Ok(BorrowedMessage<'a>),
    Err((KafkaError, BorrowedMessage<'a>)),
}

Variants§

§1.0.0

Ok(BorrowedMessage<'a>)

Contains the success value

§1.0.0

Err((KafkaError, BorrowedMessage<'a>))

Contains the error value