kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Riccomini (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-359) Add message constructor that takes payload as a byte buffer
Date Fri, 01 Jun 2012 15:32:22 GMT
Chris Riccomini created KAFKA-359:
-------------------------------------

             Summary: Add message constructor that takes payload as a byte buffer
                 Key: KAFKA-359
                 URL: https://issues.apache.org/jira/browse/KAFKA-359
             Project: Kafka
          Issue Type: Bug
          Components: core
    Affects Versions: 0.8
            Reporter: Chris Riccomini


Currently, if a ByteBuffer is passed into Message(), it treats the buffer as the message's
buffer (including magic byte, meta data, etc) rather than the payload. If you wish to construct
a Message and provide just the payload, you have to use a byte array, which results in an
extra copy if your payload data is already in a byte buffer.

For optimization, it would be nice to also provide a constructor like:

this(payload: ByteBuffer, isPayload: Boolean)

The existing this(buffer: ByteBuffer) constructor could then just be changed to this(buffer,
false).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message