I am trying to run multiple consumer for the same topic under different group name using the command line tool - kafka-console-consumer.sh. When I set --group option, it fails with error 'group is not a recognized option'. This was working fine until I upgraded to the latest kafka version (kafka_2.11-0.8.2.2).
5
votes
4 Answers
6
votes
5
votes
1
votes
--group
is not available for bin/kafka-console-consumer.sh
in new API.
By default all consumers uses config/consumer.properties
where group.id=test-consumer-group
.
Create one property file anywhere, and put group.id=<your-group-name>
.
And when you run your console-consumer, just add one new parameter as --consumer.config <your-newly-created-property-file>
$KAFKA_HOME/bin/kafka-console-consumer.sh --topic <topic-name> --zookeeper <zk-server>:<zk-port> --consumer.config <new-property-file>