Search code examples
amazon-web-servicesamazon-sqs

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.


Solution

  • 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.