showuon commented on code in PR #12753:
URL: https://github.com/apache/kafka/pull/12753#discussion_r1002816719

##########
clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java:
##########
@@ -1581,6 +1581,19 @@ public void commitAsync(final Map<TopicPartition, 
OffsetAndMetadata> offsets, Of
      * is invoked for the same partition more than once, the latest offset 
will be used on the next poll(). Note that
      * you may lose data if this API is arbitrarily used in the middle of 
consumption, to reset the fetch offsets
      *
+     * The next Consumer Record which will be retrieved when poll() is invoked 
will either have the offset specified or
+     * a higher numbered offset. A higher numbered offset will be returned if 
there is no consumer record with the offset
+     * specified but there is one with a higher offset.
+     * seek(0) is equivalent to seek to beginning for a topic with beginning 
offset 0.
+     *
+     * Seeking past the end of the highest known offset means that all 
consumer records between the highest known offset
+     * and the offset passed to seek will be skipped by poll(), which will 
only return records once the offset passed
+     * to poll() has been reached.

Review Comment:
   Are you sure this is correct? Won't it return `OffsetOutOfRangeException` 
and reset the offset by `auto.offset.reset` config?



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