先進入到kafka的bin目錄下kafka
./kafka-topics.sh --zookeeper 10.42.123.183:2181 --listit
./kafka-topics.sh --zookeeper 10.42.123.183:2181 --create --topic kfcs --partitions 1 --replication-factor 1io
./kafka-console-producer.sh --broker-list 127.0.0.1:9092 --topic kfcsconsole
./kafka-console-consumer.sh --zookeeper 10.42.123.183:2181 --topic kfcs --from-beginningzookeeper