[−][src]Type Definition rdkafka::message::DeliveryResult
type DeliveryResult<'a> = Result<BorrowedMessage<'a>, (KafkaError, BorrowedMessage<'a>)>;
The result of a message production.
If message production is successful DeliveryResult
will contain the sent message, that can be
used to find which partition and offset the message was sent to. If message production is not
successful, the DeliveryReport
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.