Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split batches which would go over the threshold #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ashleyfrieze
Copy link

An alternative fix for #24

Where in PR #37 we tried the solution of moving messages to S3 when the batch was too large, this has a disadvantage that there can be 11 overall calls to AWS SQS & S3 to deal with a batch.

This solution takes the approach of splitting the batch after the oversized messages have been pushed to S3. This may result in several batches being sent to SQS, and it requires merging send batch results together as well as manipulating the send batch request. However, it has two advantages:

  • The overall number of requests can be smaller than with the switching to S3 approach
  • There's no artificial storing of right-sized messages to S3, meaning that the consumer of the messages, does not have to make a second call to S3 for EVERY message sent in a batch.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant