I'm using kafka 0.10 kafkaConsumer API to get consumers and topic set under consumer subscribed.
Now I can get topics and partitionIds successfully by topiclist method.
To get consumer group data, I'm not found method under KafkaConsumer, but I can get group list from zookeeper by "zookeeper.getChildren(ZkUtils.ConsumersPath(), false);".
My question is how to get the relationship of group and topics. I know one group can subscribe one or more topics, but I don't know how to get the data by KafkaConsumer API or from zookeeper.
I had tried kafkaConsumer.subscription() but return is an empty list.
what I reference: https://kafka.apache.org/0101/javadoc/index.html?org/apache/kafka/clients/consumer/KafkaConsumer.html
KafkaConsumer#subscription()
return the subscription of this single consumer -- if you did not subscribe to any topic yet (not sure if you did or not), it will return an empty list of course. – Matthias J. Sax