分类
kafka

kafka-console-consumer 对 topic 测试

To listen for messages on a topic:

                                                                                
kafka-console-consumer --bootstrap-server kafka:9092 --topic test1 --from-beginning

To stop the listener session above press: Ctrl+C

To start an interactive message producer session:

kafka-console-producer --broker-list kafka-headless:9092 --topic test1

To create a message in the above session, simply type the message and press “enter”
To end the producer session try: Ctrl+C

If you specify “zookeeper.connect” in configurationOverrides, please replace “kafka-zookeeper:2181” with the value of “zookeeper.connect”, or you will get error.

发表评论

电子邮件地址不会被公开。 必填项已用*标注