- 创建topic
bin/kafka-topics.sh —create —topic lcg —partitions 1 —replication-factor 1 —bootstrap-server service-kafka-medusa-entry:9092 - bin/kafka-topics.sh —describe —bootstrap-server service-kafka-medusa-entry:9092
- bin/kafka-topics.sh —describe —topic lcg —bootstrap-server service-kafka-medusa-entry:9092 查看单个topic的情况
- bin/kafka-topics.sh —list —bootstrap-server service-kafka-medusa-entry:9092
- bin/kafka-console-producer.sh —topic lcg —broker-list service-kafka-medusa-entry:9092 发送消息
- bin/kafka-console-consumer.sh —topic lcg —from-beginning —bootstrap-server service-kafka-medusa-entry:9092 消费消息