proposal(sqs): automatic encoding of messages
56KBs opened this issue · comments
Matt Palmer commented
Goal
Ensure payloads send using the publisher confirm as valid message types. Users of watermill should not be concerned with ensuring that their payload is valid for the publisher they're using (Apart from potential sizing issues).
See https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html detailing the supported characters for a payload
Changes
Check the message being published for any invalid characters, if it is found, base64 the message and add a metadata item with key _watermill_encoding
& value base64
.
The subscriber is auto updated to check for the _watermill_encoding
metadata value, reversing the base64 encoding if it is found.