Hi, I am trying to use Apache Kafka client 0.10.2 to do batch offset fetching for all partitions of one topic. However I found the KafkaConsumer.commited() only provided the ability to fetch offset for single partition.
I read the KafkaConsumer class code and found actually it does have the batch fetching ability through coordinator.fetchCommittedOffsets(). However the coordinator object is a private one and the fetchCommitedOffsets() is not exposed either. Could anyone tell me the reason of this design? May I add one more function in KafkaConsumer to expose the fetchCommitedOffsets() function? Thanks, Martin ---------- Forwarded message ---------- From: Martin Peng <wei...@gmail.com> Date: 2017-07-06 17:36 GMT-07:00 Subject: How to fetch offset for all the partitions of one topic through single KafkaClient function call (0.10.x)? To: us...@kafka.apache.org Hi, I am using Kafka client 0.10.2. Is there a way to fetch latest committed offset for all the partitions in one function call? I am call the KafkaConsumer.commited() to get this for single partition, is there a simple way to batch fetch offsets for all the partitions in single topic in one shot? And how to fetch all partition offsets for multiple topics? Thanks Martin