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 2019/07/25 06:21:10 UTC

[GitHub] [pulsar] sijie opened a new issue #4803: Pulsar schema doesn't support null value

sijie opened a new issue #4803: Pulsar schema doesn't support null value
URL: https://github.com/apache/pulsar/issues/4803
 
 
   **Describe the bug**
   
   If a Pulsar producer sends messages without payload, Pulsar consumer is not able to consume the messages without payload. Because the payload passed to schema is an empty array not `null`. Hence exceptions are thrown. An example exception is shown as below:
   
   ```
   org.apache.pulsar.client.api.SchemaSerializationException: Size of data received by BooleanSchema is not 1
   
   	at org.apache.pulsar.client.impl.schema.BooleanSchema.validate(BooleanSchema.java:44)
   	at org.apache.pulsar.client.impl.schema.BooleanSchema.decode(BooleanSchema.java:62)
   	at org.apache.pulsar.client.impl.schema.BooleanSchema.decode(BooleanSchema.java:29)
   	at org.apache.pulsar.client.impl.MessageImpl.getValue(MessageImpl.java:273)
   	at org.apache.pulsar.client.impl.TopicMessageImpl.getValue(TopicMessageImpl.java:143)
   ```
   
   **To Reproduce**
   
   1. Use a typed producer to send messages without setting value.
   2. Use a typed consumer to receive messages.
   
   **Expected behavior**
   
   The typed consumer should receive messages with a `null` value.
   
   

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


With regards,
Apache Git Services