Reset consumer offset in Kafka

Get offset of current topic

kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group myConsumerGroup --describe | grep myTopic
Shutdown the application - you must make sure that the consumer group is not active, otherwise the reset will not work.

Reset the offsets:
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group myConsumerGroup --reset-offsets --to-earliest --topic my_topic --execute
Instead of -–to-earliest, which causes the Kafka consumer to be set back to the beginning, –-to-latest can be used to set the consumer offset to the end of the stream.

After you reset the offsets - you can check the status by issuing the first command again.