The options can only be used to set "The properties to initialize the message formatter." You have several options, you could use different properties fils, with only the group.id being different. Another option is use a .properties.template, with a group.id=<group-id>, and with a batch script first set the group.id and create a new .properties file, and then call the kafka-console-consumer.sh. If your server is always the same you would only have to pass the topic and the group to your script.
On Wed, Apr 13, 2016 at 5:20 PM Greg Hill <greg.h...@rackspace.com> wrote: > So, I know I can put group.id in the consumer.config file, but I would > like to reuse the same config file for multiple groups in testing. I > *thought* this would work: > > kafka-console-consumer.sh --bootstrap-server <servers> --new-consumer > --consumer.config <consumer.properties path> --topic <topic> --property > group.id=<group-id> > > That doesn't produce an error, but it also ignores the group.id property > and generates a group id, which doesn't have access to the topic I'm > testing against. > > So, *should* that work? If not, why not? Maybe it's just a bug? > > Also, why is --bootstrap-server required when I have it set in the config > file? The console producer has a similar issue that --broker-list is > required despite bootstrap.servers being in the config file. > > Thanks in advance. > > Greg >