kafka-server-start.sh -daemon $KAFKA_HOME/config/server.properties
kafka-topics.sh --zookeeper localhost:2181 --create --topic test --replication-factor 3 --partitions 2
kafka-topics.sh --zookeeper localhost:2181 --list
kafka-topics.sh --zookeeper localhost:2181 --describe
kafka-topics.sh --zookeeper localhost:2181 --describe --topic test
kafka-topics.sh --zookeeper localhost:2181 --delete --topic test
kafka-console-producer --broker-list localhost:9092 --topic test1
kafka-console-consumer --bootstrap-server localhost:9092 --topic test1 --from-beginning
加了–from-beginning 重头消费所有的消息,不加–from-beginning 从最新的一条消息开始消费kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic test --time -1
kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list
kafka-consumer-groups.sh --describe --group console-consumer-63307 --bootstrap-server localhost:9092
kafka-server-stop.sh