BewareMyPower opened a new pull request, #105:
URL: https://github.com/apache/pulsar-client-cpp/pull/105

   Master issue: https://github.com/apache/pulsar-client-cpp/issues/87
   
   ### Motivation
   
   To support batch index acknowledgment, we must provide a method to get the 
batch size of a batched message ID.
   
   ### Modifications
   
   Instead of adding another overload constructor to `MessageId`, this PR adds 
a `MessageIdBuilder` class to construct the `MessageId` in a more elegant way.
   
   The original constructor is counterintuitive because the partition index is 
the 1st argument.
   
   
https://github.com/apache/pulsar-client-cpp/blob/74ef1a01f5c7a4604d251de6d040c433f9bbf56b/include/pulsar/MessageId.h#L47
   
   Therefore, this PR marks it as deprecated and replace all invocations of it 
with the `MessageIdBuilder` usages.
   
   To verify the `MessageId::batchSize()`, the following tests are modified:
   - `BatchMessageTest.testBatchSizeInBytes`: the batch size is always 2 
because of the `batchingMaxAllowedSizeInBytes` config.
   - `MessageChunkingTest.testEndToEnd`: the batch size field is not set
     (default: 0) because batching is disabled.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [ ] `doc-not-needed` 
   (Please explain why)
   
   - [x] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)
   


-- 
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