kafka操作topic的方法:
1、查看topic列表:
bin/kafka-topics.sh --zookeeper node1:port,node2:port,node3:port/kafkachroot --list
2、删除topic :
1)
2)
3) 删除zookeeper "/brokers/topics/"目录下相关topicName:
rmr /kafkachroot/brokers/topics/topicName
3、创建topic:
bin/kafka-topics.sh --zookeeper node1:port,node2:port,node3:port/kafkachroot --topic topicName --create --partitions 2 --replication-factor 1
学习文档:http://blog.csdn.net/code52/article/details/50935849