lianetm commented on code in PR #14346:
URL: https://github.com/apache/kafka/pull/14346#discussion_r1320315305


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/PrototypeAsyncConsumer.java:
##########
@@ -209,6 +215,34 @@ public ConsumerRecords<K, V> poll(final Duration timeout) {
         return ConsumerRecords.empty();
     }
 
+    /**
+     * Set the fetch position to the committed position (if there is one) or 
reset it using the
+     * offset reset policy the user has configured.
+     *
+     * @return true if the operation completed without timing out
+     * @throws org.apache.kafka.common.errors.AuthenticationException if 
authentication fails. See the exception for more details
+     * @throws NoOffsetForPartitionException                          If no 
offset is stored for a given partition and no offset reset policy is
+     *                                                                defined
+     */
+    private boolean updateFetchPositions() {

Review Comment:
   Renamed to `updateFetchPositionsIfNeeded`. It better aligns with the 
`updateAssignmentMetadataIfNeeded` that will be wrapping this when we introduce 
group management (we'll end up having something like what's done in the current 
consumer 
[here](https://github.com/apache/kafka/blob/84c49c6a098986f7da9f08dc53e6a31c13484c5b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java#L1229)).
   I also updated the doc to clarify the "ifNeeded" part



-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

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

Reply via email to