I'm producing messages to a topic named as default
.
My producer partition is RD_KAFKA_PARTITION_UA
, When I'm using unassigned partition, how can I get the offset of the last message pushed to default
topic.
I don't need offset of consumer, I need offset of the last published message.
I need the offset for crash recovery, human intervention is not intended.
I need the offset using librdkafka
, when my program starts back again, based on the offset, I will do some modifications to my program, so I need to fetch it through API only and when needed.
I don't think I can rely on callback,
consider I pushed my message, I received callback and my program crashed.
or
I pushed my message, I was about to poll and my program crashed.
I'm using C language librdkafka
library.