I am trying to check the size of the queue in Kafka for a certain topics at regular time intervals. Although, I can't figure how to even check that metric even once. I'm completely new to Kafka so I'm not sure exactly what to do for this. I assume that it will involve creating either a producer or a consumer to interact with the queue, but I've hit a roadblock.
I think it is not possible at the moment. You should consider Kafka topic as a infinite data stream, so the only option you have IMO - to count consumed messages in your consumers.
You can use the kafka offset monitoring tool, which will show you log size per topic partition (you have to sum up): http://ingest.tips/2014/10/12/kafka-high-level-consumer-frequently-missing-pieces/
The queue size notion in Kafka is irrelevent because it is not a queue but a log. You can consume, rewind, jump as you wish to any offset.
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