I'm using Spring kafka listener to read messages from kafka topic.
@KafkaListener( id = "member-group", topics = "member-updated" )
I used to create a new consumer group each time(by changing above group id) to consume all records. Now I've around 50 consumer group and I want to delete them. I tried to delete from kafka windows client -
kafka-consumer-groups.bat --zookeeper <zookeeper-url> --delete --group <group-name>
but it failed with following output -
Note: This will only show information about consumers that use ZooKeeper (not those using the Java consumer API).
Error: Delete for group '<group-name>' failed because group does not exist.
So is there any way to delete these consumer group either by code or by some other tool. And what is default retention policy for consumer group.