Details
-
Sub-task
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
None
Description
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.
Attachments
Attachments
Issue Links
- links to