Kafka topic deletion not working

2019-06-23 19:19发布

I am using Kafka version 0.8.2. In the middle of development I thought I might need to delete a topic. So what I did is I put the following line in the server configuration files and started two kafka servers.

delete.topic.enable=true

When I needed to delete a topic and I ran following command,

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

Right now its already 17 hours since when I ran delete topic command but Kafka is still showing me the topic is marked for deletion. Is it a bug of Kafka or I am doing something wrong here? Because it doesn't seem normal to me. Can someone clarify in this regard?

[N.B.: I have already read this thread. But couldn't find my answer there.]

2条回答
戒情不戒烟
2楼-- · 2019-06-23 19:43

AFAIK it is not possible to delete kafka topic if you previously had delete.topic.enable=false. You can change this value, but it does not affect currently available topics. So, you can try to delete it manually.

查看更多
我想做一个坏孩纸
3楼-- · 2019-06-23 19:46

You can go to the log folder location and manually delete the files concerning the topic you want to delete.

查看更多
登录 后发表回答