I read the consumer group example in here(provided by Shopify/sarama),
and I wonder that how would I know how many consumers are in a consumer group, are there any ways I could control the number of consumers?
Thanks a lot
I read the consumer group example in here(provided by Shopify/sarama),
and I wonder that how would I know how many consumers are in a consumer group, are there any ways I could control the number of consumers?
Thanks a lot
2
Answers
To list the consumers currently assigned to a group, you can use the kafka-consumer-groups .sh shell script. Assuming that $KAFKA_HOME is the root directory of your Kafka installation, you can do:
If you want to list current groups, run the following command:
You can use
ClusterAdmin
interface in Sarama library.https://pkg.go.dev/github.com/Shopify/sarama#ClusterAdmin