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

Kafka producer should do a single write to send message sets

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7, 0.8.0
    • 0.8.0
    • core
    • None

    Description

      From email thread:
      http://mail-archives.apache.org/mod_mbox/incubator-kafka-dev/201110.mbox/%3cCAFbh0Q1PYUj32thBaYQ29E6J4wT_mrG5SuUsfdeGWj6rmEx9Gw@mail.gmail.com%3e
      > Before sending an actual message, kafka producer do send a (control) message of 4 bytes to the server. Kafka producer always does this action before send some message to the server.

      I think this is because in BoundedByteBufferSend.scala we do essentially
      channel.write(sizeBuffer)
      channel.write(dataBuffer)

      The correct solution is to use vector I/O and instead do
      channel.write(Array(sizeBuffer, dataBuffer))

      Attachments

        1. KAFKA-171.patch
          7 kB
          Jay Kreps
        2. KAFKA-171-draft.patch
          4 kB
          Jay Kreps
        3. KAFKA-171-v2.patch
          8 kB
          Jay Kreps

        Activity

          People

            jkreps Jay Kreps
            jkreps Jay Kreps
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: