Kirk True created KAFKA-16966:
---------------------------------

             Summary: Allow offset commit fetch to reuse previous request if 
partitions are a subset
                 Key: KAFKA-16966
                 URL: https://issues.apache.org/jira/browse/KAFKA-16966
             Project: Kafka
          Issue Type: Improvement
          Components: clients, consumer
    Affects Versions: 3.8.0
            Reporter: Kirk True
            Assignee: Kirk True
             Fix For: 3.9.0


In {{{}initWithCommittedOffsetsIfNeeded{}}}, the behavior of the existing 
{{LegacyKafkaConsumer}} is to allow reuse only if the partitions for the 
_current_ request equal those of the _previous_ request *exactly* 
([source|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java?rgh-link-date=2024-06-14T16%3A43%3A11Z#L927]).
 That logic is the basis for the behavior used in the 
{{{}AsyncKafkaConsumer{}}}.
 
It's unlikely to cause any problems, but it introduces a subtle difference in 
behavior between the two {{Consumer}} implementations. Also, the specific case 
that the request reuse logic solves is when the user has passed in a very low 
timeout value in a tight {{poll()}} loop, which suggests the partitions 
wouldn't be changing between those loops.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to