创建topic
sh bin/kafka-topics.sh --create --zookeeper hadoop000:2181/kafka --topic test --partitions 1 --replication-factor 1
查看topic
sh bin/kafka-topics.sh --describe --zookeeper hadoop000:2181/kafka --topic test
启动生产者
sh bin/kafka-console-producer.sh --broker-list hadoop000:9092 --topic test
启动消费者
sh bin/kafka-console-consumer.sh --bootstrap-server hadoop000:9092 --topic test
来源:CSDN
作者:游九河
链接:https://blog.csdn.net/qq_40337206/article/details/103877212