We would like to know the messages count which are not yet consumed and acknowledge by Kafka Consumer for a given Kafka topic.
Is there any way we can get the count of Unconsumed Kafka messages from a given Topic (Topic is having 10 partitions) in Java ??
kafka consumers have a per-partition "records-lag" metric (introduced in kip-92). you can sum those metrics for all partitions of your topic, and get a figure for unconsumed messages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With