When/how does a topic “marked for deletion” get finally removed?

前端 未结 11 1048
天命终不由人
天命终不由人 2020-12-24 00:09

I have issued the command to delete a topic:

./bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic  vip_ips_alerts

It seemed to

11条回答
  •  旧时难觅i
    2020-12-24 00:35

    I faced the same issue and spend a couple of days trying to identify with the issue was. I triggered command to delete the topics, however the topics were marked for deletion but they were not deleted.

    1. I first checked the configuration which are set right. Under: server.properties

      delete.topic.enable=true for all brokers

    2. I restarted the broker to check if the topics got delete (No!!).
    3. I check no data under /kafka/data folder.
    4. I even considered the option to wait until the retention time got exceed.

    None helped. I had to finally login to zooker

    ./zkCli.sh # and delete the topics using 
    rmr /brokers/topics/<> and rmr /admin/delete_topics/<>
    

    Please remember to restart kafka after this. Hope this solves your issue.

提交回复
热议问题