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

Speed up Consumer#committed by returning cached offsets for owned partitions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • consumer

    Description

      All of the KafkaConsumer#committed APIs will currently make a remote blocking call to the server to fetch the committed offsets. This is typically used to reset the offsets after a crash or restart, or to fetch offsets for other consumers in the group. However some users may wish to invoke this API on partitions which are currently owned by the Consumer, in which case the remote call is unnecessary since it should be able to just keep track of what it has itself committed.

      We should consider optimizing these APIs to just return the cached offsets in place of the remote call when passed in only partitions that are currently owned. This is similar to what we do in Consumer#position, although there we have a guarantee that the partitions are owned by the Consumer whereas in #committed we do not

      Attachments

        Issue Links

          Activity

            People

              manyanda Manyanda Chitimbo
              ableegoldman A. Sophie Blee-Goldman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: