kafka 删除topic

/usr/local/kafka/bin/zookeeper-shell.sh IP:2181

WatchedEvent state:SyncConnected type:None path:null

ls /admin/delete_topics
[]
ls /brokers/topics/prod-polling-gt-polling-access-prod
quit

/usr/local/kafka/bin/kafka-topics.sh --zookeeper IP:2181 --describe --topic prod-test-iis-mes-webservice001-prod
/usr/local/kafka/bin/kafka-topics.sh --zookeeper IP:2181 --delete --topic prod-polling-gt-polling-access-prod

/usr/local/kafka/bin/kafka-topics.sh --zookeeper IP:2181 --delete --topic prod-polling-gt-polling-access-prod

方式二:

设置:delete.topic.enable=true
重启kafka服务

kafka查看lag并排序

sort -t ',' -k2 -n -r topic.txt