user3502577
user3502577

Reputation: 119

Kafka Streams Application Reset Tool didn't work, and could not reset topic offset to 0

I referenced https://www.confluent.io/blog/data-reprocessing-with-kafka-streams-resetting-a-streams-application/ and tried to use Kafka Streams Application Reset Tool for resetting the kafka streams application. But even I did all prerequisite and the necessary steps, when I check the resetting topic offset by /opt/cloudera/parcels/KAFKA/lib/kafka/bin/kafka-consumer-groups.sh, the CURRENT-OFFSET is still not 0.

Anyone could help with that? Will be really appreciated.

Upvotes: 0

Views: 475

Answers (1)

Matthias J. Sax
Matthias J. Sax

Reputation: 62350

Depending on the version you are using, the reset tool commit zero of "beginning offset" --if you topic was subject to retention and was truncated, "beginning offset" is not zero any longer.

This is by design and actually better than committing zero because zero would be an invalid offset for this case, and on application restart auto.offset.reset would trigger (and if it's not configured as "earliest" you would get some undesired behavior).

You be able to get the current earliest offset from a topic via bin/kafka-run-class.sh kafka.tools.GetOffsetShell.

Upvotes: 1

Related Questions