You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "BewareMyPower (via GitHub)" <gi...@apache.org> on 2023/04/14 18:12:03 UTC
[GitHub] [pulsar-client-cpp] BewareMyPower opened a new pull request, #252: [C API] Support synchronous consumer batch receive
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-cpp] shibd commented on pull request #252: [C API] Support synchronous consumer batch receive
Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd commented on PR #252:
URL: https://github.com/apache/pulsar-client-cpp/pull/252#issuecomment-1510852008
Thanks for your explain. I'll merged this PR, and then I'll push TODO feature.
--
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-cpp] shibd merged pull request #252: [C API] Support synchronous consumer batch receive
Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd merged PR #252:
URL: https://github.com/apache/pulsar-client-cpp/pull/252
--
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org