I would like to know how to get the number of messages per topic in kafka through java api, i don't know want to use the command line tool which is mentioned in the following post. Any idea how to do this?
PS: i dont want to loop through the KAFKA consumer stream to figure out the count, i trying to figure this count at the beginning (before consuming from Kafka)
Java, How to get number of messages in a topic in apache kafka