删除kafka的topics

参考:

http://www.bubuko.com/infodetail-2859810.html

https://blog.csdn.net/russle/article/details/82881297

https://blog.csdn.net/dianyueneo/article/details/37527087

https://blog.csdn.net/little_fxc/article/details/98494263

<code>

kafka-topics.sh –delete –zookeeper localhost:2181 –topic `kafka-topics.sh –list –zookeeper localhost:2181`
while read line
do
echo $line
kafka-configs.sh –zookeeper localhost:2181 –alter –entity-name $line –entity-type topics –add-config retention.ms=1000
kafka-config.sh –zookeeper localhost:2181 –alter –entity-name $line –entity-type topics -add-config cleanup.policy=delete
kafka-topics.sh –delete –zookeeper localhost:2181 –topic $line
done < /opt/tmp.topics2

</code>