I'm facing issue with kafka topic deletion.
Using kafka rest API's to create/delete topic and for producing & consuming messages. I have tried to delete the topic where the topic will be deleted, but after some time say 10 sec, topic gets reappeared.
Have checked the Consumer Group offsets and LAG is listed as negative.
docker run --net=host --rm confluentinc/cp-kafka:3.1.0 kafka-consumer-groups --zookeeper localhost:2181 --describe --group grp1
GROUP TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG OWNER
grp1 topic1 0 3 0 -3 none
It seems deleting a kafka topic is still has some bugs.
* The only way to delete a topic permanently is as follows: *
stop the brokers
remove the directories on disk
sudo rm -rf kafka_data_dir/topic_name
bin/zkCli.sh - to start zookeeper shell
rmr /config/topics/topic_name
rmr /brokers/topics/topic_name
rmr /admin/delete_topics/topic_name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With