nicolo-paganin edited a comment on issue #5454: mysql JDBC Sink - consumer error URL: https://github.com/apache/pulsar/issues/5454#issuecomment-586766992 @sijie Thanks for the reply 1. Yes I was using a custom SerDe class because of a problem with python 2.7 (here https://github.com/apache/pulsar/blob/b8679078dc6632795c4d81cff9caedd316444f17/pulsar-client-cpp/python/pulsar/functions/serde.py#L77, that `.encode('utf-8')` is not compatible with python 2.7 since in 2.7 strings are already byte strings). Now I am using Python 3.x so I just removed that cusotm SerDe class and tried again. Unfortunately I have the same error. A thing that I forgot to say is that when I create the function I set also this param `--schema-type SensorSchema` 2. Yes I forgot to say that I did some modifcation in the `python-instance` you can find it here in my fork https://github.com/nicolo-paganin/pulsar/commit/ca45931ae47bf9f9eec5ad2cd64e043854ca3024. I am not sure if the modification is considering all cases and if it is good, anyway it was a try. The modification permits to write the AvroSchema using `context.publish()` I was sure that the schema was present in the topic because I can read data with a consumer and calling this `pulsar-admin schemas get topic2` is returning me the right schema: ```json { "version": 0, "schemaInfo": { "name": "topic2", "schema": { "type": "record", "name": "SensorSchema", "namespace": "it.oncode.argo.api.actors", "fields": [ { "name": "value", "type": "double" }, { "name": "timestamp", "type": "long" } ] }, "type": "AVRO", "properties": {} } } ``` @sijie do you mean the JAVA producer code? If yes, I can confirm the with JAVA producers I have no problem, the problem is using Python
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
