Scanteianu commented on code in PR #12753: URL: https://github.com/apache/kafka/pull/12753#discussion_r1029216062
########## clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java: ########## @@ -1581,6 +1581,23 @@ 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, + * by default, with {@link ConsumerConfig AUTO_RESET_CONFIG} set to "latest" + * 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. Review Comment: added a clarification, I think it's worth having the note because it clarifies that records are 0 indexed at the creation of a topic -- 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