Skip to content

Reason: Message must be shorter than 262144 bytes. #82

Answered by co-go
jktan0504 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @jktan0504, thanks for trying out the library! In your initiation, it looks like you set the message threshold to 2 GB (sqsextendedclient.WithMessageSizeThreshold(2097152)). Unfortunately, AWS has a hard limit and will only accept messages up to 256 KiB (look under the Message Size section). They accept payloads up to 2 GB (so you can batch together multiple 256 KiB messages in a SendMessageBatch call), however it is currently impossible for any single message to exceed 256 KiB.

If you remove that line (configuring the message threshold to 2 GB), the default message size threshold is set to the maximum possible (256 KiB). That should result in sending your messages as expected.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by co-go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #81 on February 16, 2024 16:28.