简体   繁体   English

代码没有错误,为什么消息仍然被发送到死信队列?

[英]No bugs in codes, why messages are still being sent to Dead Letter Queue?

I have 2 Lambda functions that respectively sent and received some workloads via a SQS.我有 2 个 Lambda 函数,它们分别通过 SQS 发送和接收一些工作负载。 But many messages are unexpectedly sent to DLQ.但是许多消息意外地发送到 DLQ。 I am confident that it wasn't caused by in-code bugs because not all messages went to DLQ.我确信这不是由代码中的错误引起的,因为并非所有消息都发送到 DLQ。

I set reservedConcurrentExecutions = 1 and maxReceiveCount = 1 , does it matter?我设置了reservedConcurrentExecutions = 1maxReceiveCount = 1 ,这有关系吗? I'm thinking if I increase maxReceiveCount perhaps fewer messages will be sent to DLQ.我在想,如果我增加maxReceiveCount ,发送到 DLQ 的消息可能会更少。

Anyhow, I hope somebody can walk me through the methodology behind that.无论如何,我希望有人能带我了解这背后的方法。

Increasing maxReceiveCount worked eventually.增加maxReceiveCount最终起作用了。 The official developer guide says:官方开发人员指南说:

If your function returns an error, or can't be invoked because it's at maximum concurrency, processing might succeed with additional attempts. To give messages a better chance to be processed before sending them to the dead-letter queue, set the maxReceiveCount on the source queue's redrive policy to at least 5.

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

相关问题 即使主订阅者成功,pubsub 消息 go 也可以发送到死信队列吗? - Can pubsub messages go to the dead letter queue even if they succeed with the main subscriber? 事件源映射(对于 AWS MSK-Lambda)是否将消息发送到 aws lambda 中的死信队列? - Does Event Source Mapping (For AWS MSK-Lambda) send messages to dead letter queue in aws lambda? 如何使用 MassTransit 将消息发送到 Azure 服务总线中的死信队列? - How to send messages to the dead letter queue in Azure Service Bus using MassTransit? SNS 重新驱动到死信队列不起作用 - SNS redrive to Dead letter queue not working 处理 AWS SQS 死信队列 - Handle AWS SQS Dead Letter Queue Amazon SQS - 如何验证队列是否为死信队列? - Amazon SQS - How to validate if a queue is a dead-letter queue? 使用 CDK 授予对 SNS 主题订阅上的死信队列的权限 - Using CDK to grant permissions to Dead Letter Queue on SNS Topic Subscription Lambda 的 AWS Cloudwatch 订阅过滤器和死信队列 - AWS Cloudwatch Subscription Filter and Dead Letter Queue for Lambda Azure函数中的Service Bus死信队列处理 - Service Bus Dead Letter Queue Processing In Azure Functions 谷歌云发布/订阅 - 订阅者未将消息转发到死信主题 - Google cloud Pub/Sub - subscriber not forwarding messages to dead letter topic
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM