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

when consumer got empty messageset, fetchResponse.highWatermark != current_offset?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 0.8.2.1
    • None
    • offset manager
    • None

    Description

      I use simple consumer fetch message from brokers (fetchSize > messageSize),when consumer got empty messageSet,e.g :

      val offset = nextOffset
      val request = buildRequest(offset)
      val response = consumer.fetch(request)
      val msgSet = fetchResponse.messageSet(topic, partition)

      if (msgSet.isEmpty) {
      val hwOffset = fetchResponse.highWatermark(topic, partition)

      if (offset == hwOffset)

      { // ok, doSomething... }

      else

      { // in our scene, i found highWatermark may not equals current offset ,but we did not reproduced it. // Is this case could happen ? if could, why ? }

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            hongjiang netcafe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: