Create multiple consumers in Kafka in command line

前端 未结 5 690
孤城傲影
孤城傲影 2021-02-08 05:59

I\'m new in Kafka. When I was running the quick start example in command line, I found I can\'t create multiple consumers in command line.

Condition:

I built a t

5条回答
  •  旧巷少年郎
    2021-02-08 06:41

    You can use the below command to create the consumers in the group "test-consumer-group" to "test" topic:

    bin/kafka-console-consumer.sh --bootstrap-server :9092 --topic test --consumer-property group.id=test-consumer-group
    

    Below command will list the consumer group configuration:

    bin/kafka-consumer-groups.sh --bootstrap-server :9092 --describe --group test-consumer-group
    

    Eg:

    GROUP || TOPIC || PARTITION || CURRENT-OFFSET || LOG-END-OFFSET || LAG      || OWNER
    test-consumer-group || test || 0 || 10 || 10 || 0 || consumer-1_/10.210.223.170
    

提交回复
热议问题