How to add consumerGroup for a topic in kafka using Shopify/sarama golang library?

Issue

In the sarama library there is an option to initialize NewConsumerGroup but how to hook it hook i t up to NewConumer?

Solution

NewConsumerGroup creates its own Consumer, so there’s nothing for you to hook it to

Source: https://github.com/Shopify/sarama/blob/main/consumer_group.go#L105

Answered By – OneCricketeer

Answer Checked By – Robin (GoLangFix Admin)

Leave a Reply

Your email address will not be published.