kirktrue commented on code in PR #14789:
URL: https://github.com/apache/kafka/pull/14789#discussion_r1397472048


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetcherTest.java:
##########
@@ -1124,6 +1126,62 @@ public void testFetchMaxPollRecords() {
         assertEquals(5, recordsToTest.get(1).offset());
     }
 
+    /**
+     * KAFKA-15836:
+     * Test that max.poll.records is honoured when consuming from multiple 
topic-partitions and the
+     * fetched records are not aligned on max.poll.records boundaries.
+     *
+     * tp0 has records 1,2,3; tp1 has records 6,7,8
+     * max.poll.records is 2
+     * 
+     * poll 1 should return 1,2
+     * poll 2 should return 3,6
+     * poll 3 should return 7,8
+     * 
+     * Or similar :)

Review Comment:
   I'm pretty sure that there's nothing in the current code that will attempt 
to pull _N_ records from _M_ partitions fairly. Is it possible that the number 
of records produced to topic _T1_ is >= the value of `maxRecords` at any given 
point in time, records produced to _T2_ will never be consumed?



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