Create multiple consumers in Kafka in command line

前端 未结 5 682
孤城傲影
孤城傲影 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:30

    1. Default, kafka-console-consumer.sh will create a random group.
    2. If you want to specify the group name, you can:
      1. Add group.id=group_name to a local file filename
      2. Use --consumer.config filename option of kafka-console-consumer.sh to set group
    3. You can check your groups at zookeeper's /consumers/ directory.

    Refer: kafka/core/src/main/scala/kafka/tools/ConsoleConsumer.scala

提交回复
热议问题