查看这个topic的详细分区信息
bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic test001

查看所有的topic信息
bin/kafka-topics.sh -list -zookeeper localhost:2181

创建topic
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test002

删除topic
bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic test003

发送消息
bin/kafka-console-producer.sh --broker-list node01:9092 --topic test004

消费消息
bin/kafka-console-consumer.sh --zookeeper node01:2181 --from-beginning --topic test004