Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bytearray Deserializer #55

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gferreux
Copy link

This PR add an option to deserialize messages as ByteArray for compatibility with binary codecs (avro, protobuf).

The use of ByteString.toStringUtf8 on message before the codec decode it tries to parse the string as UTF-8, but binary messages like protocol buffers messages are not valid UTF-8. They are binary data, and the UTF-8 mangling corrupts it and cause weird errors like "CodedInputStream encountered a malformed varint". Binary codecs expect message as ByteArray.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant