How to shift back the offset of a topic within a stable Kafka consumer group?

The reset-offsets option for kafka-consumer-groups.sh first checks to see if a consumer is active in that group before attempting to shift back your offsets. ‘Stable’ means you have an active consumer running.

Use the describe-groups option to check on your consumer groups:

bin/kafka-consumer-groups.sh --bootstrap-server $SERVERS --group $GROUP --describe

If you see an entry under ‘CONSUMER-ID/HOST/CLIENT-ID’ for your topic, that means you still have a consumer running. Once you shut down the app that’s keeping the consumer alive your consumer group will be inactive and you’ll be able to shift your offsets at will.

Leave a Comment