aws-sdk-java-v2 icon indicating copy to clipboard operation
aws-sdk-java-v2 copied to clipboard

Bytes Based batching for SendMessageRequest Batching

Open joviegas opened this issue 1 year ago • 1 comments

Motivation and Context

Reference Doc for size of SendMessageBatch Size

https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessageBatch.html

The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KiB (262,144 bytes).

Reference Doc for size of message-attributes

https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-metadata.html#sqs-message-attributes In our implementation, we’ve accounted for an ATTRIBUTE_MAPS_PAYLOAD_BYTES size of 16 KB. This represents a worst-case scenario where the user sends the maximum possible attribute map in SendMessage. This consideration primarily affects batching in cases where the messages payload comes close to 240 KB. For smaller messages, this will have little to no impact on batching behavior.

Modifications

Is this config exposed to Public API

No, this is not exposed in public api we are setting a Default of 256K payload size.

Testing

Screenshots (if appropriate)

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)

License

  • [x] I confirm that this pull request can be released under the Apache 2 license

joviegas avatar Aug 28 '24 01:08 joviegas

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

sonarqubecloud[bot] avatar Aug 29 '24 18:08 sonarqubecloud[bot]