{"records":[{"ID":"YW1hbGdhbXdheS5yZWFsc2Vuc2UuRjIwMC5LYWZrYTE0MzYzOTcwMTc1OTQuQ2FwdHVyZWZyYW1lLjI0"},{"timestamp":1436397017594},{"data":"/9j/4AAQSkZJRgABAgAAAQABAADXtsNO5/"}],"value_schema":"{\"type\": \"record\", \"name\": \"capture_frame\", \"fields\": [{\"name\": \"ID\", \"type\": \"string\"},{\"name\": \"timestamp\", \"type\": \"long\"},{\"name\": \"data\", \"type\": \"string\"}]}"}
{"records":[{"value":"YW1hbGdhbXdheS5yZWFsc2Vuc2UuRjIwMC5LYWZrYTE0MzYzOTcwMTc1OTQuQ2FwdHVyZWZyYW1lLjI0"},{"value":1436397017594},{"value":"/9j/4AAQSkZJRgABAgAAAQABAADXtsNO5/"}],"value_schema":"{\"type\": \"record\", \"name\": \"capture_frame\", \"fields\": [{\"name\": \"ID\", \"type\": \"string\"},{\"name\": \"timestamp\", \"type\": \"long\"},{\"name\": \"data\", \"type\": \"string\"}]}"}
{"offsets":[{"partition":0,"offset":50,"error_code":null,"error":null},{"partition":0,"offset":51,"error_code":null,"error":null},{"partition":0,"offset":52,"error_code":null,"error":null}],"key_schema_id":null,"value_schema_id":null}
Hello supporters,I am having issues with the proxy not recognizing the schemas. This is the kind of message I would like to send:{"records":[{"ID":"YW1hbGdhbXdheS5yZWFsc2Vuc2UuRjIwMC5LYWZrYTE0MzYzOTcwMTc1OTQuQ2FwdHVyZWZyYW1lLjI0"},{"timestamp":1436397017594},{"data":"/9j/4AAQSkZJRgABAgAAAQABAADXtsNO5/"}],"value_schema":"{\"type\": \"record\", \"name\": \"capture_frame\", \"fields\": [{\"name\": \"ID\", \"type\": \"string\"},{\"name\": \"timestamp\", \"type\": \"long\"},{\"name\": \"data\", \"type\": \"string\"}]}"}ID and data are Base64 encoded strings.If I try so send this data, I get 500 errors.
Eventually I got the system to accept data sending the following message:{"records":[{"value":"YW1hbGdhbXdheS5yZWFsc2Vuc2UuRjIwMC5LYWZrYTE0MzYzOTcwMTc1OTQuQ2FwdHVyZWZyYW1lLjI0"},{"value":1436397017594},{"value":"/9j/4AAQSkZJRgABAgAAAQABAADXtsNO5/"}],"value_schema":"{\"type\": \"record\", \"name\": \"capture_frame\", \"fields\": [{\"name\": \"ID\", \"type\": \"string\"},{\"name\": \"timestamp\", \"type\": \"long\"},{\"name\": \"data\", \"type\": \"string\"}]}"}But I had to use "application/json" for content type instead of "application/vnd.kafka.avro.v1+json" or the binary header version when sending binary messages. This gets accepted by the API with this message:{"offsets":[{"partition":0,"offset":50,"error_code":null,"error":null},{"partition":0,"offset":51,"error_code":null,"error":null},{"partition":0,"offset":52,"error_code":null,"error":null}],"key_schema_id":null,"value_schema_id":null}Notice that both key_schema_id and value_schema_id are NULL.If I try specifying the key_schema_id registered for the topic but I get missing value_schema_id responses and when only specifying the key_schema_id (without value) I get a 422 "" error back.
Anyway since I was getting data in I tried to keep working on my usecase. I am using Spark streaming to consume the messages and process the data.Now the behavior on my Spark program. has thrown me off. When I am getting the messages into RDDs, the Base64 data is automatically decoded (no idea where this happens, i was not expecting it) and the long value of the timestamp is base64 encoded!
And since all the fields are "value" and there is no schema associated with it I get malformed jsons when receiving the data and I cannot map it properly inside the streaming minibatches.Can anyone help me out figure out why the schema registration is not working and how to fix it or how to do it correctly?
--Thanks,Ignacio
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/b5814765-f363-4fcf-8252-d682b3e5086c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
{"error_code": 40801,"message": "Schema registration or lookup failed"}
--
You received this message because you are subscribed to a topic in the Google Groups "Confluent Platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/confluent-platform/c-PJ3YQU7Kk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to confluent-platf...@googlegroups.com.
To post to this group, send email to confluent...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/CAE1jLMOpJcuUBD8em%2Bqe3AKjpoNM_kRt_TohkPTyGd1bXsox8A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/CAFiXWkCO2ATYGiJAcuE8Qv%2BCeF%3DuJPbrSnbF1KPy-fHkLM-eWg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/CAE1jLMPHWHm12KUgJ%3Dd%3DKg8vGKhwhJTmdOqywY0LtkW15aNPBg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/CAFiXWkA1Vr8zupdW0r2sJdXOuJoJRA6Q92J4VFgr0eiFq4SnKQ%40mail.gmail.com.