如何在Sarama中使用组ID

As you probably know, Sarama's documentation is so bad. Nothing is clear. I have just found this example: https://godoc.org/github.com/Shopify/sarama#example-Consumer

It consumes the messages. That's ok. I couldn't figure out how to use GroupID while consuming.

How can set group id in Sarama?

By default Sarama does not support Consumer Groups.

As mentioned in Sarama's FAQ, support for Consumer Groups is provided by a separate plugin: https://github.com/bsm/sarama-cluster