massakam edited a comment on issue #81: Support seting topic schema when 
creating producers/consumers
URL: https://github.com/apache/pulsar-client-node/pull/81#issuecomment-603688099
 
 
   > I think this is fine - any user of a schema'd topic is (with this 
implementation) still responsible for serializing to Buffer when sending 
messages or deserializing from Buffer into whatever schema when consuming 
messages.
   
   Once users implement such an application, isn't it a breaking change for 
them to support automatic encoding/decoding?
   ```js
   const buffer = /* object serialization> */;
   producer.send({
     data: buffer,
   });
   ```
   ↓
   ```js
   const obj = {
     key1: "val1",
     key2: "val2",
   };
   producer.send({
     data: obj,
   });
   ```
   If so, I think parts for automatic encoding/decoding should be added in this 
PR or as soon as possible.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to