[英]AWS SQS dead-letter queue redrive policy
In my system there is a main-queue and dead-letter-queue.在我的系统中有一个主队列和死信队列。
When any message failed in main-queue it goes to dead-letter-queue.当主队列中的任何消息失败时,它会进入死信队列。
Reason of failing message in main-queue sometime random not critical ie message can be processed if reattempt from the main-queue.主队列中消息失败的原因有时是随机的,不是关键的,即如果从主队列重新尝试,则可以处理消息。
In my system there are 3 attempt to any failed message, meaning will send message to main-queue from dead-letter-queue only 3 times.在我的系统中,任何失败的消息都会尝试 3 次,这意味着只会将消息从死信队列发送到主队列 3 次。
How can i track the message whether its 3rd attempt is exhausted and there is no need to send it back to main-queue for processing (will keep in dlq till it expire)?我如何跟踪消息是否第三次尝试已用尽并且无需将其发送回主队列进行处理(将保留在 dlq 中直到它过期)?
You can use the property ApproximateReceiveCount from MessageAttributes in SQSEvent.SQSMessage
您可以在SQSEvent.SQSMessage
中使用 MessageAttributes 中的属性ApproximateReceiveCount
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.