Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happends to a failed message in AWS SQS if there is no redrive policy set?

I do understand that when I want my failed messages to be moved to a DLQ I can use a redrive policy, where I can mention the number of retries and the DLQ name.

What happens if I don't set a redrive policy? What is the default retry number and what happens when the number of retries exceeds the threshold?

Your responses are highly appreciated.

like image 856
Subhopriyo Avatar asked Oct 15 '22 03:10

Subhopriyo


1 Answers

SQS messages only get removed from the queue if they've completed successfully - when a consumer grabs a message and then fails it becomes visible again the queue after a while.

In terms of maximum retries that depends on your retention period.

If you want to control this behavior setup a DLQ and set max retries to X number.

like image 183
Mrk Fldig Avatar answered Oct 22 '22 14:10

Mrk Fldig