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

前端 未结 5 743
后悔当初
后悔当初 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:12

    Got the answer to change the groupname from command prompt!!

    steps:

    1. create a new consumer.properties file, say consumer1.properties.
    2. change group.id= in the consumer1.properties.
    3. bin/kafka-console-consumer.sh --new-consumer --bootstrap-server localhost:9092 --topic topicname --from-beginning --consumer.config config/consumer1.properties --delete-consumer-offsets

提交回复
热议问题