[
https://issues.apache.org/jira/browse/KAFKA-5273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on KAFKA-5273 started by 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)