in librdkafka,
The data has been put in the transmission queue via following function.
virtual ErrorCode produce (Topic *topic, int32_t partition, int msgflags, void *payload, size_t len, const void *key, size_t key_len, void *msg_opaque)
The result of the transfer can be found in the dr_cb() registered as a callback through the poll(0).
class ExampleDeliveryReportCb : public RdKafka::DeliveryReportCb {
public:
void dr_cb (RdKafka::Message &message) {
// I want to know the order of produce.
}
};
If I produce 10 times, how can I know if the third produce has been successful? I can see the actual messages or the number of messages left in the transmission queue, but the result of third produce is unknown.
I want to synchronize the sequence number of the message produced and the sequence number of the message reported to be complete via dr_cb. What should I do?