0

I wanted to know what are the common practices for the redelivery of messages from the DLQ. So if a message fails and is put on the queue, I know one approach is to have another lambda process that message and redeliver it. That kinda works...

But what about poison messages, is there a way maybe I can augment the message keep a count so my redeliver lambda can check and decide if it's the terminal error message. Stops it from going around in loops.

user1555190
  • 2,803
  • 8
  • 47
  • 80
  • Why is there a lambda listening on the DLQ and redelivering the message? What is the point of a DLQ if the message is simply put back into the original queue. Normally a DLQ entry means something broke and needs manual fixing or recovery, you fix the code, deploy it and then manually move the messages from the dlq to the q. – luk2302 Oct 29 '21 at 10:11
  • @luk2302 there could be a possibility something went down say a DB. and yes i could do that manually. But if could automate that, would that not be better. – user1555190 Oct 29 '21 at 12:52
  • Automation makes no sense here, no. Your original queue should have a redrive policy that lets the system handle downtimes of a few minutes, that is basically what the redrive policy is there, let it try the message e.g. 10 times, visibility timeout of 1 minute and you should be able to handle system downtimes of up to 10 minutes. If you want to always redeliver no matter what then get rid of the dlq completely and let the messages stay in the original queue until they are processed successfully. Then put an alarm on the queue that alerts if messages are too old (e.g. >1day). – luk2302 Oct 29 '21 at 13:41
  • @luk2302 Yes valid point, redelivery would cater for short outages, il look into that. Long outages would cause the message to still end up in the DLQ, i guess i would need some mechanism to attempt again atleast once, maybe a manual tool to move them. As for automated, i did manage to find one just now.. This is what i was thinking https://aws.amazon.com/blogs/compute/using-amazon-sqs-dead-letter-queues-to-replay-messages/ – user1555190 Oct 29 '21 at 13:58

0 Answers0