Skip to content

For SqsAsyncBatchManager, add the support to override maxBatchBytesSize #5888

@msaad10

Description

@msaad10

Describe the feature

While working with SqsAsyncBatchManager, got the error as:

software.amazon.awssdk.services.sqs.model.BatchRequestTooLongException:Batch requests cannot be longer than 262144 bytes. You have sent XXXXXX bytes. (Service: Sqs, Status Code: 400, Request ID: *)

Upon further analysis, it seems that there is no way we can retrieve the messages in a batch due to which exception occurred.

Also, for sdk v2 override configuration does not provide the option to override maxBatchSizeBytes, though it was present in v1.

The request is to provide the option to override maxBatchSizeBytes in v2 also.

Though I found the code which is defaulting the maxBatchSizeBytes to 256KB, and if thats the case than why the SqsAsyncBatchManager is sending the batch which sums to greater than 256KB.

Image

Use Case

Need this feature so we dont get BatchRequestTooLongException when working with SqsAsyncBatchManager.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

V2

JDK version used

21

Operating System and version

Ubuntu 2022

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions