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


##########
clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java:
##########
@@ -1581,6 +1581,10 @@ 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
      *
+     * Note that, since messages are 0-indexed, {@link 
#seekToBeginning(Collection)} should be used to retrieve
+     * the message at offset 0.
+     *
+     * @param offset the last offset which was consumed. The next message 
received will have a higher offset number than this

Review Comment:
   Thank you very much, you were correct. I have added a few tests in mock 
consumer meant to confirm the behaviour. These work on the assumption that the 
behaviour for the real consumer is the same as for the mock consumer (the mock 
consumer was just easier to write tests for)



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