You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2017/12/20 15:18:19 UTC
[GitHub] ivankelly opened a new pull request #993: Add utility to explode raw batch into individual messages
ivankelly opened a new pull request #993: Add utility to explode raw batch into individual messages
URL: https://github.com/apache/incubator-pulsar/pull/993
The utility method takes a raw batch message and generates then
generates a raw message for each message in the batch. The generated
messages have metadata which is a composite of the batch message
metadata, and the single message metadata for that message. The
message ID is generated by using the offset within the batch message
along with the message ID of the batch message itself.
Returning a ByteBuf for the metadataAndPayload of the batched message
involves a copy of the payload, as both DoubleByteBuf doesn't work
with getShort() and CompositeByteBuf does not work with slice(). I
think this is ok for now though, as this will only be used by
compaction, and compaction is a batch process, so latency isn't
paramount. However, this should be revisited if this does prove to be
causing performance problems.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services