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

KafkaConsumer#committed might unexpectedly shift consumer offset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1.0
    • None
    • clients
    • None

    Description

      When client uses manual partition assignment (e.g. KafkaConsumer#assign), but then accidentally calls KafkaConsumer#committed (for whatever reason, most probably bug in user code), then the offset gets shifted to latest, possibly skipping any unconsumed messages, or producing duplicates. The reason is that the call to KafkaConsumer#committed invokes AbstractCoordinator, which tries to fetch committed offset, but doesn't find group.id (will be probably even empty). This might cause Fetcher to receive invalid offset for partition and reset it to the latest offset.

      Although this is primarily bug in user code, it is very hard to track it down. The call to KafkaConsumer#committed might probably throw exception when called on client without auto partition assignment.

      Attachments

        Activity

          People

            Unassigned Unassigned
            janl Jan Lukavský
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: