Hi Robin, thanks for your blogs and they are really helpful. Actually I have a question on how to check lags for each partition of topics that a consumer group has subscribed. Basically I’m running a Kafka cluster on AWS MSK, and on my Kafka client machine I was able to check the lags by using the Kafka cli:
kafka-consumer-groups --describe --group --bootstrap-server
I’d love to programmatically implement this functionality. Do you have any suggestions on how to achieve that using Golang, or is there any REST API I can call? Thanks and looking forward to your reply!
Hi @shaobol!
I don’t have experience with golang clients, but Admin APIs can be used to collect this information: AdminClient has 2 operations that help to calculate consumer group lag: