#启动KAFKA
./bin/kafka-server-start.sh -daemon/opt/kafka/config/server.properties
#关闭KAFKA
kill -9 进程号
#KAFKA创建topic
./bin/kafka-topics.sh --create -zookeeper 12.131.206.20:2181,12.131.206.21:2181,12.131.206.22:2181 --replication-factor 1 --partitions 3 --topic TOPIC_AUDIT_PERFORMANCE##控制台接收消息
./bin/kafka-console-consumer.sh --zookeeper 12.131.206.20:2181,12.131.206.21:2181,12.131.206.22:2181 --from-beginning --topic test
##控制台发送消息
./bin/kafka-console-producer.sh --broker-list 12.131.206.20:9092,12.131.206.20:9092 --topic test
#查看已经创建的topic
./bin/kafka-topics.sh --zookeeper 12.131.206.20:2181,12.131.206.20:2181,12.131.206.20:2181 --list
#查看kafka消费情况
./kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --broker-info --group $group --topic $topic --zookeeper $zk_host:2181
#$group对应的是你的group $topic对应是你的topic $zk_host:2181对应的是你的zookeeper主机地址