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).
Consumer group.id is mandatory. If you do not set consumer group.id , you will get exception. So obviously you're setting it somewhere in your code or the framework or library you're using is setting it internally. You should always set group.id by yourself.
Step1: Open the Windows command prompt. Step2: Use the '-group' command as: 'kafka-console-consumer -bootstrap-server localhost:9092 -topic -group <group_name>' . Give some name to the group. Press enter.
How to change consumer offset? Use the kafka-consumer-groups.sh to change or reset the offset. You would have to specify the topic, consumer group and use the –reset-offsets flag to change the offset.
The consumer group-id is mandatory, it plays a major role when it comes to scalable message consumption. To start a consumer group-id is mandatory.
I figured a way out. The group option is no longer available for the console-consumer. If you need to specify the group, then you can do so by using the --consumer.config option. It takes the path to the consumer.properties file as input. It worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With