Replies: 1 comment
-
Thanks for your report -- I have read through it last night and since I don't know a ton about SQS yet I did some googling. I found this stack overflow that was useful to me and it states that while it is common for clients to base64 encode/decode the payload because of some UTF-8 restrictions in the charset that SQS supports, that its not a requirement and json should also be able to meet the same requirements. I am not sure yet how we want to handle this with a code change, but read "But there is no reason why base64 has to be used at all." from https://stackoverflow.com/questions/33019426/rules-regarding-auto-encoding-of-messages-into-base64-while-submitting-to-sqs |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When Kombu receives a message from SQS, it tries to decode its body as base64 but
base64.b64decode
won't necessarily raise aTypeError
if the message body is not base64 encoded.https://github.com/celery/kombu/blob/master/kombu/transport/SQS.py#L232-L235
For example sometimes we have nested base64 and don't want it to be decoded.
Any combination of 4 valid base64 characters is successfully decoded.
Decoding invalid base64 characters returns an empty string.
Beta Was this translation helpful? Give feedback.
All reactions