Closed raphael-leger closed 2 years ago
were you able to find the issue? I am facing the same issue.
The workaround was to create a file in my project with the same content as the file in this repository: https://github.com/timothymugayi/boto3-sqs-extended-client-lib/blob/master/pysqs_extended_client/SQSClientExtended.py
Except I removed the three lines I talked about: https://github.com/timothymugayi/boto3-sqs-extended-client-lib/blob/f9a6cff3c20567f671280e599f889baae44ca330/sqs_client/SQSClientExtended.py#L205-L207
I am using this file instead of this repository an everything works 👌
just set message_attributes = {} when you use send_message function, like below: sqs.send_message(self.queue_url, content, message_attributes={})
I used it and it works well
Hi added the fix for this open issue https://github.com/timothymugayi/boto3-sqs-extended-client-lib/pull/16
Workaround resolution is here
For some reason, the following three lines cause the client to crash with the message
Message attribute name SQSLargePayloadSize is reserved for use by SQS extended client.
sometimes: https://github.com/timothymugayi/boto3-sqs-extended-client-lib/blob/f9a6cff3c20567f671280e599f889baae44ca330/sqs_client/SQSClientExtended.py#L205-L207Workaround: when removing those lines, I see no more error and everything works as expected every time.
The way I call the send_message method is using the following signature without adding any message attribute:
sent_message = sqs.send_message(url, message)
ie.
message_attributes
should be equal to{}
and should not contain the so-calledRESERVED_ATTRIBUTE_NAME
right? I did not investigate why the above ValueError would be raised from time to time. Just leaving an issue here if anyone wants to go further or encounters the same problem as the workaround is pretty simply to remove this check and exception raise.