Apache Kafka get list of consumers on a specific topic
As it can be guest from the title, is there a way to get the consumer list on a specific topic in java? Untill now Im able to get the list of topics like this final ListTopicsResult listTopicsResult = adminClient.listTopics(); KafkaFuture<Set<String>> kafkaFuture = listTopicsResult.names(); Set<String> map = kafkaFuture.get(); but I havent found a way to get the list of consumers on each topic I was recently solving the same problem for my kafka client tool. It is not easy, but the only way, which I found from the code is the following: Properties props = ...//here you put your properties