'Kafka change Offset from Latest to earliest

I have a consumer with 'latest' offset. If I change to earliest, Does my consumer read the messages from starting offset (OR) does it continue from where latest offset left ? no change in consumer group name.



Solution 1:[1]

If you've started the consumer already, and it has created a group (committed offsets), then auto.offset.reset value doesn't matter; it'll continue reading from the last committed offset.

If you want to reset the offsets for an existing group, you need to run kafka-consumer-groups --reset-offsets tool, or manually call seek methods on the consumer before it starts polling.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 OneCricketeer