cd /usr/local/shan/kafka_2.13-2.7.1
启动zk
nohup ./bin/zookeeper-server-start.sh ./config/zookeeper.properties >/dev/null 2>&1 &
启动kafka
nohup ./bin/kafka-server-start.sh ./config/server.properties >/dev/null 2>&1 &
生产
./bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
消费 .
/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
查看topic
./bin/kafka-topics.sh -list -zookeeper localhost:2181
删除topic ./bin/kafka-topics.sh --delete --topic filebeat5 --bootstrap-server localhost:9092
消费组消费情况 ./bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group extranet_consumer --describe