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

Seeking consumer to evicted offset resets the offset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 0.11.0.1
    • None
    • consumer
    • None
    • Windows

    Description

      We use manual partition assignment and save the offsets to our storage. The topic also has short "retention.ms" property. When we try to restart consumption from an already evicted offset, the offset is reset according to the "auto.offset.reset" property. That is:

      • if "latest" is configured, it only returns records that were inserted after the `seek` call
      • if "earliest" is configured, it tries to restart at 0, which fails for the same reason, because offset=0 is also evicted.

      Expected behavior is to report the situation with an exception, thrown from either `seek()` or `poll()` call. The user will then be expected to `seekToBeginning` or `seekToEnd` or to any other position.

      Another option is to restart at earliest available record, regardless of the value of the "auto.offset.reset" property. However, this way the consumer has no way of knowing that it missed some records it expected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vilo Viliam Durina
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: