Currently, as far as I know, the only way to remove Kafka's consumer group is to manually delete the Zookeeper /consumers/[group_id] path.
If you just want to delete a consumer group, you donβt need to worry about deleting the Zookeeper path manually, but if you do this to rewind offsets, the following will help you.
First of all, you must stop all consumers belonging to the consumer group before deleting the Zookeeper path. If you do not, these consumers will not use the newly created messages and will soon close their connections to the Zookeeper cluster.
When restarting consumers, if you want consumers to start from the very beginning, auto.offset.reset property auto.offset.reset smallest (or earliest in new releases of Kafka). The default value for this property is largest (or latest in newer releases of Kafka), which causes restarted consumers to read after the largest offset, which in turn only consumes newly created messages. For more information about ownership, see Consumer Config in the Kafka documentation.
For your information, the question arises: How can I rewind the offset at the consumer? in the Kafka FAQ, but that didn't help me much.
Heejin
source share