如何底删除kafka的topic,然后重建?

如何底删除kafka的topic,然后重建?如何底删除kafka的topic,然后重建?知道的说一下,谢谢了

已邀请:

OpenSkill - OpenSkill官方账号

1、设置配置文件允许删除

delete.topic.enable=true 配置添加到 config/server.properties

2、执行删除命令

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


在zookeeper中确认:

 删除zookeeper下/brokers/topics/test-topic节点
 删除zookeeper下/config/topics/test-topic节点
 删除zookeeper下/admin/delete_topics/test-topic节点

consumer 的话 删除groupid


删除逻辑参考:http://www.cnblogs.com/huxi2b/p/4842695.html

要回复问题请先登录注册