kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manikumar (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KAFKA-359) Add message constructor that takes payload as a byte buffer
Date Thu, 17 Aug 2017 12:11:00 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Manikumar resolved KAFKA-359.
-----------------------------
    Resolution: Fixed

This has been fixed in newer Kafka versions.

> 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: Improvement
>          Components: core
>    Affects Versions: 0.8.0
>            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 was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message