Closed jcjp closed 2 years ago
I have found the fix for the issue, it seems there is a mismatch with the schema as Kafka needs double quotes for JSON object keys when passed. More information on this link: Json parse on message value string not working
Apparently I only got this working locally, when using another application to post a message through HTTP request and encoding the data via AVRO I get the same error when decoding on my consumer side.
Why is the decoding process failing when the message is coming from Kafka but when its a local variable from the code everything works fine here is some of my code snippet:
I am producing a message from a docker Kafka image console. Here is a sample payload:
It might be a mismatch with the schema because something ia messing with the message, however looking at the logs (screenshot) the payload is what I expected. Is it safe to just slice the buffer I tried slicing it with a value of
9
but still same error.I could not use
fromString
as well andtoBuffer
.