Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete __Consumer_offset Topic form Kafka

I'm trying to delete Kafka topic __Consumer_offset as it is causing a lot of confusion for my brokers. When i do so, it says this topic can't be marked for deletion.

i'm using the zookeeper cli to delete it such as rmr /brokers/topic __consumer_offset, but it is not working!

like image 684
Tr Ex Avatar asked Oct 27 '25 07:10

Tr Ex


1 Answers

__consumer_offsets is a kafka internal topic and it is not allowed to be deleted through delete topic command. It contains information about committed offsets for each topic:partition for each group of consumers (groupID). If you want to wipe it out entirely you have to delete the zookeeper dataDir location. That implies, you lose all the metadata.

Also if you just want to get rid of the existing consumer groups, you can as well reset the offsets or consider deleting them.

like image 130
Nishu Tayal Avatar answered Oct 29 '25 05:10

Nishu Tayal