简体   繁体   English

向 SQS 发布消息时出错:AmazonSQS; 状态码:403; 错误代码:RequestThrottled

[英]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.从我的 API 网关,我将 JSON 有效负载发布到我的 SQS FIFO 队列之一,从中再次被消耗并发布到另一个 FIFO 队列。

While publishing my JSON payloads from API Gateway to my first SQS FIFO queue, getting the below error: AmazonSQS;在将我的 JSON 有效负载从 API 网关发布到我的第一个 SQS FIFO 队列时,出现以下错误: AmazonSQS; Status Code: 403;状态码:403; Error Code: RequestThrottled错误代码: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.我每秒连续发送 200 条消息,大约 10 分钟后,我开始收到少数请求的 RequestThrottled 错误。 Its coming around 2000 throttle errors in total 500000 requests.在总共 500000 个请求中,它会出现大约 2000 个节流错误。

I am using simple AWS Java SDK for publishing the message to SQS:我正在使用简单的 AWS Java SDK 将消息发布到 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.对我来说,看起来有这么多消息,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.默认情况下,FIFO 队列支持每秒最多 3,000 条消息(带批处理)或每秒最多 300 条消息(每秒 300 次发送、接收或删除操作)(不带批处理)。 If you require a higher throughput, submit a support ticket to request a review of your FIFO queue requirements.如果您需要更高的吞吐量,请提交支持票以请求审查您的 FIFO 队列要求。

You can contact AWS support to increase if demand requires.如果需要,您可以联系 AWS 支持以增加。

See: https://aws.amazon.com/sqs/faqs/#FIFO_queues请参阅: 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).如果使用批处理,则 FIFO 队列支持每秒最多 3,000 个事务,每个 API 方法(SendMessageBatch、ReceiveMessage 或 DeleteMessageBatch)。 The 3000 transactions represent 300 API calls, each with a batch of 10 messages.这 3000 个事务代表 300 个 API 调用,每个调用包含 10 条消息。 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).没有批处理的情况下,FIFO 队列每秒最多支持 300 个 API 调用,每个 API 方法(SendMessage、ReceiveMessage 或 DeleteMessage)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误: - {“code”:“403”,“message”:“HMAC验证失败”} - error :- {“code”:“403”, “message”:“HMAC validation Failure”} 为什么一段时间后我在 Java 收到 403 状态码? - Why am I getting 403 status code in Java after a while? 状态代码:403,同时获取不存在的对象 - Status Code: 403, while Getting an Object that doesn't exists 无法使用AWS SES API发送电子邮件。 错误消息,状态码:403 - Emails could not be sent using AWS SES APIs. Error message with Status Code: 403 SQS ExpiredToken:请求中包含的安全令牌是过期状态代码:403 - SQS ExpiredToken: The security token included in the request is expired status code: 403 “状态”:403,“错误”:“禁止”“消息”:邮递员弹簧启动代码中的“访问被拒绝” - "status": 403, "error": "Forbidden" "message": "Access Denied" in postman spring boot code 为什么我在尝试更改代码时收到错误消息? - Why am I getting an error message while trying to code for change? 使用Testng运行硒代码时获取NullPointerException错误消息 - Getting NullPointerException error message while running the selenium code using testng AngularJS显示403 HTTP错误代码的自定义错误消息/页面 - AngularJS show custom error message / page for 403 http error code spring CORS和angular not working:HTTP状态码403错误 - spring CORS and angular not working : HTTP status code 403 error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM