Kafka主题删除不起作用 [英] Kafka topic deletion not working
问题描述
我使用的是 Kafka 版本 0.8.2.在开发过程中,我想我可能需要删除一个主题.所以我所做的是在服务器配置文件中添加以下行并启动了两个 kafka 服务器.
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
现在距离我运行删除主题命令已经 17 个小时了,但 Kafka 仍然显示该主题已标记为删除.这是卡夫卡的错误还是我在这里做错了什么?因为这对我来说似乎不正常.有人可以在这方面澄清吗?
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.]
推荐答案
AFAIK 如果您之前有 delete.topic.enable=false
,则无法删除 kafka 主题.您可以更改此值,但不会影响当前可用的主题.因此,您可以尝试手动删除它.
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.
这篇关于Kafka主题删除不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!