feat: increase lambda worker default message retention period #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have been defaulting to 4 days for message retention on SQS queues in the LambdaWorker. This has been the same for both the main queue and the workers DLQ.
This hasn't caused a problem - the LambdaWorker enforces having an alarm so we always get an alarm if there are messages on the DLQ in production and they are always dealt with in time.
However, in a none production environment recently, we left messages on a DLQ during the August holiday season, assuming the retention period was 14 days. They expired after 4 days. This was not a live environment, so no production issue occurred, but it highlighted that we are still using the default 4 days.
This PR increases the retention period on the queues to the maximum 14 days. There is no reason for this to be set to anything less - especially in production and on DLQ's.
This PR does not make the retention period configurable - it enforces a policy of always using the maximum of 14 days intentionally.