Add support for SqsTemplate to send more than 10 messages at once - #1659
Open
joseiedo wants to merge 11 commits into
Open
Add support for SqsTemplate to send more than 10 messages at once#1659joseiedo wants to merge 11 commits into
joseiedo wants to merge 11 commits into
Conversation
Add more tests simplifying tests stop sequential send when a failure occurs
joseiedo
requested review from
MatejNedic,
maciejwalkowiak and
tomazfernandes
as code owners
July 24, 2026 23:15
tomazfernandes
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR @joseiedo. I see you're still pushing commits, so I'll leave just one comment about the partitioning strategy. Let me know your thoughts.
joseiedo
commented
Jul 25, 2026
| int totalSize = messagesToUse.size(); | ||
| return IntStream.rangeClosed(0, (totalSize - 1) / pageSize) | ||
| .mapToObj(index -> messagesToUse.subList(index * pageSize, Math.min((index + 1) * pageSize, totalSize))) | ||
| .mapToObj(index -> (Collection<T>) messagesToUse.subList(index * pageSize, Math.min((index + 1) * pageSize, totalSize))) |
Contributor
Author
There was a problem hiding this comment.
I'm not sure why suddenly this was happening, but the pipeline couldn't compile successfully if I didn't used this cast.
https://github.com/awspring/spring-cloud-aws/actions/runs/30174435089/job/89720833992
Contributor
Author
|
I added a binpack algorithm here, let me know your thoughts about it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
AWS SDK doesn't have support to send a batch of messages of more than 10 items. This PR add an alternative where the received batch is partitioned in smaller batches of 10. For FIFO queues the batches are sent sequentially (if one fails, the others aren't sent), while for non-FIFO they are parallelized.
💡 Motivation and Context
solves #1042
💚 How did you test it?
I added integration test and unit tests with a sample.
📝 Checklist
🔮 Next steps
Check if there's concerns with this approach and update documentation explaining how this works in order to make it clear for users.