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

SimpleConsumer.fetchOffset returns wrong error code when no offset exists for topic/partition/consumer group

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.1, 0.8.1.1
    • Fix Version/s: 0.8.2.0
    • Component/s: consumer, core
    • Labels:
    • Environment:
      Linux

      Description

      This concerns Kafka's Offset Fetch API:

      According to Kafka's current documentation, "if there is no offset associated with a topic-partition under that consumer group the broker does not set an error code (since it is not really an error), but returns empty metadata and sets the offset field to -1." (Link below)

      However, in Kafka 08.1.1 Error code '3' is returned, which effectively makes it impossible for the client to decide if there was an error, or if there is no offset associated with a topic-partition under that consumer group.

      https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-MetadataAPI

        Attachments

        1. KAFKA-1637.patch
          7 kB
          Ewen Cheslack-Postava
        2. KAFKA-1637_2014-10-15_14:47:21.patch
          10 kB
          Ewen Cheslack-Postava
        3. KAFKA-1637_2014-10-15_09:08:12.patch
          8 kB
          Ewen Cheslack-Postava

          Activity

            People

            • Assignee:
              ewencp Ewen Cheslack-Postava
              Reporter:
              amir.malekpour Amir Malekpour
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: