You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/05/07 02:20:55 UTC

[GitHub] [pulsar] gaoran10 edited a comment on pull request #6379: [Issue 4803][client] return null if the message value/data is not set by producer

gaoran10 edited a comment on pull request #6379:
URL: https://github.com/apache/pulsar/pull/6379#issuecomment-619188317


   @nlu90 Hi, I'm working on this feature based on your PR. Thanks.
   
   Add the flag `nullValue` in the `MessageMetadata` and `SingleMessageMetadata` default value is false. If the message value is null set the flag to true. When users invoke the method `message.getValue()` or `message.getData()`, then check the `nullValue` flag, if the flag is true return `null`.
   
   Support users to peek the null value message by admin API.
   
   Users could send a `null` value message as below.
   ```
   producer.newMessage().value(null).send();
   ```
   
   @nlu90 @sijie @jiazhai @codelipenghui Please have a review, thanks.


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

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