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

   ### Motivation
   
   This is the 1st PR to support the batch receive feature for C APIs.
   
   ### Modifications
   
   - Add the `pulsar_messages_t` struct to represent a list of messages
   - Add the `pulsar_messages_get` and `pulsar_messages_size` functions to 
traverse all messages in `pulsar_messages_t`
   - Add the `pulsar_consumer_batch_receive` function to receive messages in 
batch and the `pulsar_messages_free` function to free the allocated memory.
   - Add `c_ConsumerTest.testBatchReceive` to test batch receive.
   
   ### Verifications
   
   There is no memory leak in the test:
   
   ```bash
   $ valgrind --leak-check=full ./tests/pulsar-tests 
--gtest_filter='c_ConsumerTest.*'
   ...
   ==3019==    definitely lost: 0 bytes in 0 blocks
   ==3019==    indirectly lost: 0 bytes in 0 blocks
   ==3019==      possibly lost: 0 bytes in 0 blocks
   ```
   
   ### TODO
   
   - Batch receive policy
   - Asynchronous batch receive
   - Fix memory leak in other C tests
   
   ### 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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to