- The default message retention period is 4 days, which means a message that stays in SQS for more than 4 days will be deleted
- You can set it from 60 seconds to 14 days
Visibility Timeout
When a consumer receives a message, that message will not be visible by others with a visibility timeout, in order to prevent other consumers from receiving and processing the message.
- Default visibility timeout: 30 seconds
- Minimum: 0 seconds
- Maximum: 12 hours
Set visibility timeout according to the execution time of the job. If too small, the same message might be consumed multiple times. If too large, other consumers might need to wait for too long if the first consumer fails to process the message.