cd 到kafka 目录下
创建topic
create topic
bin/kafka-topics.sh --zookeeper spark1:2181,spark2:2181,spark3:2181 --topic WordCount --replication-factor 1 --partitions 1 --create创建生产断
bin/kafka-console-producer.sh --broker-list spark1:9092,spark2:9092,spark3:9092 --topic WordCount
(!!!!!记得是9092端口)