lucasbru commented on code in PR #17091:
URL: https://github.com/apache/kafka/pull/17091#discussion_r1747400688


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecords.java:
##########
@@ -90,6 +91,15 @@ public int count() {
         return count;
     }
 
+    public Map<TopicPartition, OffsetAndMetadata> nextOffsets() {

Review Comment:
   This doesn't seem to achieve the goal that we are intending. Because the 
offset that we want to commit is exactly not `lastRecordOffset + 1`, but the 
position inside the consumer. I think we need to pass the OffsetAndMetadata 
into this class as part of the constructor.
   
   That would mean we need to, after all, propose a KIP that extends the 
constructor of this class, because the constructor is public. Sorry, I missed 
that before. Let's implement it first, before we write the KIP, just to make 
sure that we get it right this time!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to