#创建主题 指定分区一 副本一
bin/kafka-topics.sh --create --topic test2 --bootstrap-server lin:9092 -replication-factor 1 --partitions 1
#查看主题
bin/kafka-topics.sh --describe --topic test2 --bootstrap-server lin:9092
#连接生产者
bin/kafka-console-producer.sh --topic test2 --bootstrap-server lin:9092
#连接消费者
bin/kafka-console-consumer.sh --topic test2 --bootstrap-server lin:9092
#查看消费者组的偏移量
./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group consumer-group