简体   繁体   中英

Getting error while publishing message to SQS: AmazonSQS; Status Code: 403; Error Code: RequestThrottled

From my API Gateway, I am publishing the JSON payloads to one of my SQS FIFO queue from which again getting consumed and publishing to another FIFO queue.

While publishing my JSON payloads from API Gateway to my first SQS FIFO queue, getting the below error: AmazonSQS; Status Code: 403; Error Code: RequestThrottled

Currently I am working on a performance testing. I am sending continuous 200 messages each second and after sometime around 10 mins, I start getting RequestThrottled errors for few requests. Its coming around 2000 throttle errors in total 500000 requests.

I am using simple AWS Java SDK for publishing the message to SQS:

final SendMessageRequest sendMessageRequest = new SendMessageRequest(sqsURL, messageMetaData);
sendMessageRequest.setMessageGroupId(BoostConstant.GROUP_NAME);
sendMessageRequest.setMessageDeduplicationId(messageMetaData.getId());
amazonSQS.sendMessage(sendMessageRequest);

For me it looks like as there are so many messages there might be some limit in SQS FIFO. But need your help to understand what are the possible ways to resolve this issue.

Thank you in advance.

There is indeed a limit>

By default, FIFO queues support up to 3,000 messages per second with batching, or up to 300 messages per second (300 send, receive, or delete operations per second) without batching. If you require a higher throughput, submit a support ticket to request a review of your FIFO queue requirements.

You can contact AWS support to increase if demand requires.

See: https://aws.amazon.com/sqs/faqs/#FIFO_queues

A limit you may be hitting is Message throughput :

If you use batching , FIFO queues support up to 3,000 transactions per second , per API method (SendMessageBatch, ReceiveMessage, or DeleteMessageBatch). The 3000 transactions represent 300 API calls, each with a batch of 10 messages. To request a quota increase, submit a support request.

Without batching , FIFO queues support up to 300 API calls per second , per API method (SendMessage, ReceiveMessage, or DeleteMessage).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM