chlyzzo commented on issue #12596:
URL: https://github.com/apache/pulsar/issues/12596#issuecomment-958999972


   test send the message:
   in scala:
   val user = new Person("werewr", 35)
   producer.send(user)
   
   in python:
   producer.send(Person(name="wtr", age=23)
   
   and python read, in schema/schema_avro.py:
   
           def decode(self, data):
               print(data, type(data), )
               buffer = io.BytesIO(data2=)
               d = fastavro.schemaless_reader(buffer, self._schema)
               return self._record_cls(**d)
   
   ----------
   get result:
   from scala send message:
   ('\x02\x0cscala1F', <type 'str'>) 
   
   from python send message:
   ('\xe2\n\x02\x0cscala1', <type 'str’>)
   
   so, they are not the same, there must has decode and encode,
   
   


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


Reply via email to