一、现将kafka调通
查看zookeeper的topic
cd /usr/software/zookeeper/zookeeper/bin
./zkCli.sh start
ls /brokers/topics
先来说一下,删除kafka无用topic
./kafka-run-class.sh kafka.admin.DeleteTopicCommand --zookeeper localhost:2181 --topic test
如果按照上述走是可以看到消息的消费的。
启动kafka
bin/kafka-server-start.sh config/server.properties
创建话题
./kafka-create-topic.sh -partition 1 -replica 1 -zookeeper centos1:2181 -topic test
看一下话题
./kafka-list-topic.sh -zookeeper centos1:2181
开启producer话题
./kafka-console-producer.sh -broker-list centos1:9092 -topic test
开启consumer
./kafka-console-consumer.sh -zookeeper centos1:2181 -topic test
&nb