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

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

    If you are using bash then you can use its process substitution capability.

    bin/kafka-console-consumer.sh --zookeeper localhost:2181 \
    --topic nil_RF2_P2 --from-beginning \
    --consumer.config <(echo group.id=test1)
    

提交回复
热议问题