Bhargavkonidena opened a new pull request, #563:
URL: https://github.com/apache/pulsar-client-cpp/pull/563
<!--
### Contribution Checklist
- PR title format should be *[type][component] summary*. For details, see
*[Guideline - Pulsar PR Naming
Convention](https://docs.google.com/document/d/1d8Pw6ZbWk-_pCKdOmdvx9rnhPiyuxwq60_TrD68d7BA/edit#heading=h.trs9rsex3xom)*.
- Fill out the template below to describe the changes contributed by the
pull request. That will give reviewers the context they need to do the review.
- Each pull request should address only one issue, not mix up code from
multiple issues.
- Each commit in the pull request has a meaningful commit message
- Once all items of the checklist are addressed, remove the above text and
this checklist, leaving only the filled out template below.
-->
<!-- Either this PR fixes an issue, -->
Fixes #489
<!-- or this PR is one task of an issue -->
### Motivation
Currently the producer cannot send a null value message, which is used as a
tombstone for a specific key on a compacted topic.
In addition, the consumer cannot differentiate empty values from null
values, because all these values are presented as empty std::strings.
### Modifications
1. Added MessageBuilder::setNullValue() method that sets the null_value
field in MessageMetadata
2. Added Message::hasNullValue() method to check if a message has null value
3. Updated batch message serialization (Commands.cc) to preserve null_value
in SingleMessageMetadata
4. Updated batch message deserialization (Message.cc) to copy null_value
from SingleMessageMetadata
5. Added C API functions: pulsar_message_set_null_value() and
pulsar_message_has_null_value()
6. Added unit tests and integration tests
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
*(Please pick either of the following options)*
This change is a trivial rework / code cleanup without any test coverage.
*(or)*
This change is already covered by existing tests, such as *(please describe
tests)*.
*(or)*
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end deployment with large payloads
(10MB)*
- *Extended integration test for recovery after broker failure*
### 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)
- [ ] `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]