1.旧版本需要添加zookeeper
创建topic
bin/kafka-topics.sh --create --topic st_topic --replication-factor 1 --partitions 1 --zookeeper 10.233.98.202:2181
查看topic
bin/kafka-topics.sh --list --bootstrap-server localhost:9092
2.新版本不需要zookeeper
创建topic
bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic st_topic --replication-factor 1 --partitions 1
查看topic
bin/kafka-topics.sh --list --bootstrap-server localhost:9092