So I have a consumer group running and listening to messages from a topic. How do I add more instances of consumers to the consumer group? If this is how i listen to the messages
let consumer = new kafka.ConsumerGroup(options, topicname);
consumer.on("message", function(message) {
//process message here
});
I tried creating consumers and including the same groupname in the options,
new kafka.Consumer(
client,
[
{ topic: topicName}
],
{
groupId: groupId
}
);
but i couldn't see that being reflected in the consumer group when i run the command
bin/kafka-consumer-groups.sh --describe --group groupname --bootstrap-server localhost:9092
I see the same consumer being assigned different partitions of the topic.
How do I add more consumers to this existing consumer group that was created?