Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16966

Allow offset commit fetch to reuse previous request if partitions are a subset

    XMLWordPrintableJSON

Details

    Description

      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). That logic is the basis for the behavior used in the AsyncKafkaConsumer.

      The proposed change is to allow for request reuse if the partitions for the current request are a subset of those of the previous request. This introduces a subtle difference in behavior between the two Consumer implementations, so we need to decided if we want to change both implementations or just AsyncKafkaConsumer. 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.

      Attachments

        Issue Links

          Activity

            People

              taijuwu TaiJuWu
              kirktrue Kirk True
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: