guozhangwang commented on a change in pull request #10137:
URL: https://github.com/apache/kafka/pull/10137#discussion_r580786789



##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/Consumer.java
##########
@@ -243,6 +244,11 @@
      */
     Map<TopicPartition, Long> endOffsets(Collection<TopicPartition> 
partitions, Duration timeout);
 
+    /**
+     * @see KafkaConsumer#currentLag(TopicPartition)
+     */
+    OptionalLong currentLag(TopicPartition topicPartition);

Review comment:
       If we concern that users may call this function too frequent looping a 
large number of partitions, and each call is synchronizing on the subscription 
state, then maybe we can make it in a batching mode.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to