Amazon SQS如何控制重试次数 [英] Amazon SQS how to control the number of retries
问题描述
我正在配置当请求的URL没有以状态200
响应时,Elastic Beanstalk会将任务再次放入队列.
When the requested URL is not responding with status 200
Elastic Beanstalk will put the task again in the queue.
如何配置号码或重试?
我知道解释是隐藏在ErrorVisibilityTimeout
,InactivityTimeout
,Dead Letter Queues
...后面的某个地方,但是在我效率低下的头脑中,这些概念仍然没有变得绿色.
I know the explanation is somewhere hidden behind ErrorVisibilityTimeout
, InactivityTimeout
, Dead Letter Queues
... but these concepts are still not growing green in my inefficient mind.
例如,我只想配置最大重试次数0 ,所以可以尝试,但不进行任何重试.
For example I just want to configure maximum number of retries 0 so there is try but not any retry.
推荐答案
启用死信队列,并将DLQ最大接收值设置为1.这意味着消息只能在接收前一次被接收(并且不能删除).被发送到死信队列.
Enable Dead Letter Queues, and set the DLQ Maximum Receives value to 1. This means that a message can only be received (and not deleted) one time before it is sent to the Dead Letter Queue.
在Configuration > Worker Configuration > Advanced Options
的beantalk环境管理员中可以找到该字段:
This field is found into the beanstalk environment admin into Configuration > Worker Configuration > Advanced Options
:
或进入SQS队列管理员进入Queue Actions > Configure Queue
:
Or into the the SQS Queue admin into Queue Actions > Configure Queue
:
在一个位置更改值会将更改传播到另一位置.
Changing the value in one place will propagate the change to the other place.
这篇关于Amazon SQS如何控制重试次数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!