dajac commented on code in PR #22538:
URL: https://github.com/apache/kafka/pull/22538#discussion_r3393804887


##########
clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java:
##########
@@ -1521,8 +1521,15 @@ public Map<String, List<PartitionInfo>> 
listTopics(Duration timeout) {
      * any records from these partitions until they have been resumed using 
{@link #resume(Collection)}.
      * Note that this method does not affect partition subscription. In 
particular, it does not cause a group
      * rebalance when automatic assignment is used.
+     * <p/>
+     * The pause state is preserved across a rebalance for partitions that 
remain assigned to this
+     * consumer, but it is not preserved for partitions revoked from this 
consumer
+     * (e.g., the paused state is lost when the partition is reassigned to 
another member).
+     * The eager rebalance protocol revokes all partitions on every rebalance,
+     * so under that protocol no pause/resume state is preserved; the 
cooperative rebalance protocol and
+     * the consumer group protocol (KIP-848) only revoke partitions that are 
no longer assigned, so the pause/resume
+     * state of partitions that remain assigned to this consumer is preserved.

Review Comment:
   small nit: We should use the `classic` vs `consumer` language here to align 
with the config. I would also give example of an assignor for each sub-mode of 
the `classic` one. I don't think people really understand `eager` vs 
`cooperative`.



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