You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Apurva Mehta (JIRA)" <ji...@apache.org> on 2017/05/18 18:03:04 UTC

[jira] [Assigned] (KAFKA-5273) KafkaConsumer.committed() should get latest committed offsets from the server

     [ https://issues.apache.org/jira/browse/KAFKA-5273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apurva Mehta reassigned KAFKA-5273:
-----------------------------------

    Assignee: Apurva Mehta

> KafkaConsumer.committed() should get latest committed offsets from the server
> -----------------------------------------------------------------------------
>
>                 Key: KAFKA-5273
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5273
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: clients, core, producer 
>            Reporter: Apurva Mehta
>            Assignee: Apurva Mehta
>            Priority: Blocker
>              Labels: exactly-once
>             Fix For: 0.11.0.0
>
>
> Currently, the `KafkaConsumer.committed(topicPartition)` will return the current position of the consumer for that partition if the consumer has been assigned the partition. Otherwise, it will lookup the committed position from the server. 
> With the new producer `sendOffsetsToTransaction` api, we get into a state where we can commit the offsets for an assigned partition through the producer. So the consumer doesn't update it's cached view and subsequently returns a stale committed offset for it's assigned partition. 
> We should either update the consumer's cache when offsets are committed through the producer, or drop the cache totally and always lookup the server to get the committed offset. This way the `committed` method will always return the latest committed offset for any partition.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)