如何删除Kafka的Topic

server.properties文件中添加配置:delete.topic.enable=true

创建kafka主题:

 


  1. kafka-topics.sh --create --zookeeper 192.168.168.200:2181--replication-factor 1--partitions 1--topic TestTopic

 

执行删除命令:


  1. kafka-topics.sh  --delete--zookeeper 192.168.168.200:2181  --topic TestTopic

查看:


  1. kafka-topics.sh --list --zookeeper 192.168.168.200:2181
原文地址:https://www.cnblogs.com/yangcx666/p/8723829.html