I'm using Protobuf-net (https://code.google.com/p/protobuf-net/) to serialize my class, and then trying to transmit this via amazon SQS.
When I do that I get this error:
Amazon.SQS.AmazonSQSException: Invalid binary character '#xC' was found in the message body, the set of allowed characters is #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF].
which is pretty self-explanatory.
Has anyone got a good solution on how to get this working?
Only these characters are allowed in the message body: see the SendMessage API docs.
To send any binary content, you have to encode it, e.g. using Base64. The message is then larger, but contains only ASCII characters, which is even more strict than Amazon requires.
We are using this approach e.g. in the softwaremill-common library to send a serialized Java object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With