GitHub user apurvam opened a pull request:

    https://github.com/apache/kafka/pull/3119

    KAFKA-5273: Make KafkaConsumer.committed query the server for all partitions

    Before this patch the consumer would return the cached offsets for 
partitions in its current assignment. This worked when all the offset commits 
went through the consumer. 
    
    With KIP-98, offsets can be committed transactionally through the producer. 
This means that relying on cached positions in the consumer returns incorrect 
information: since commits go through the producer, the cache is never updated. 
    
    Hence we need to update the `KafkaConsumer.committed` method to always 
lookup the server for the last committed offset to ensure it gets the correct 
information every time.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apurvam/kafka 
KAFKA-5273-kafkaconsumer-committed-should-always-hit-server

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/3119.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3119
    
----
commit 17eb7eab70a40e3d4208a56463bb418350f80950
Author: Apurva Mehta <apu...@confluent.io>
Date:   2017-05-22T23:36:38Z

    Make KafkaConsumer.committed hit the server for all partitions, even those 
in its current assignment

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to