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 --
if you want change group id without lost offset of record you have get offset manually of current Group.id and set to new run consumer that have new id. if don't have any control to get offset in consumer instance you can run this command.
/bin/kafka-consumer-groups.sh --new-consumer --bootstrap-server : --group Group_name --describe
and then you can seek data from specific offset. pay attention you should call seek after call poll، Assign command not work. also you can see my sample of code in github
Example here