tongsucn commented on PR #66:
URL: https://github.com/apache/pulsar-client-cpp/pull/66#issuecomment-1298127898

   @BewareMyPower @shibd @RobertIndie I found a problem on the new interface:
   
   When batching is enabled on producer side, `Consumer::receive` actually 
creates a shallow copy of the whole message batch and sets reading offset (i.e. 
`SharedBuffer::readIdx_`) via `SharedBuffer::slice` in 
`Commands::deSerializeSingleMessageInBatch`.
   
   It means that the messages from a batch cannot be **_moved_** into another 
`std::string` without exposing the reading offset. Therefore I think the 
current implementation of `Message::releaseData` or `Message::releaseData` 
itself is not a good design. If you have any better ideas, please tell me, or 
just close the issue and PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to