how to set group name when consuming messages in kafka using command line

前端 未结 5 803
后悔当初
后悔当初 2021-02-07 04:53

Any idea how to set group name when consuming messages in kafka using command line.

I tried with the following command :

bin/kafka-console-consumer.sh --         


        
5条回答
  •  半阙折子戏
    2021-02-07 05:11

    You can use the --group option like this (tested with Kafka 2.0.0):

    bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --group test-consumer --topic test --from-beginning

提交回复
热议问题