Dead letter recovery
Choose replay speed from downstream capacity
Moving messages quickly can overwhelm the consumer or provider that originally failed. Estimate net recovery progress and reserve capacity for current work.
In this article
Identify the constrained stage
Measure worker processing time, database pressure and external API limits for representative messages. The queue's movement rate is not necessarily the rate of useful completion.
Different failure groups may have different costs. A simple projection update and a document conversion should not automatically share the same replay estimate.
Use the actual workload distribution rather than the fastest successful sample.
Calculate the net drain
If an illustrative consumer safely completes 200 operations per minute while current work arrives at 150, only 50 operations per minute are available to reduce backlog under that capacity.
A backlog of 9,000 then takes about three hours before interruptions or new failures. Increasing message movement beyond completion capacity only shifts where the backlog waits.
Include retries and downstream throttling in the measured rate.
Use weighted estimates when the mix is uneven. If a document conversion occupies a worker for ten seconds while a projection update takes one tenth of a second, an equal message count does not imply equal capacity. A sample dominated by projections will overstate the safe replay rate for a conversion-heavy backlog.
Track completed work by class during the first cohort. If the slower class exhausts memory or a downstream limit, reduce or separate that class rather than slowing every unrelated recovery operation blindly.
Start with a controlled cohort
Replay a small representative set and verify both effects and current-service health. Increase the rate only when evidence supports it.
Keep a stop mechanism and understand what it can still prevent. Work already moved or claimed may continue after a redrive task is cancelled.
Use separate scheduling or priorities where needed to prevent historical recovery from starving urgent current operations.
Budget retention and review effort
Failed messages consume storage, but human investigation can be the larger cost. Improve classification and repeated-failure fixes rather than repeatedly paying to replay the same poison messages.
Watch expiry deadlines so unresolved work does not disappear before a decision. Longer retention alone is not a recovery process and may increase sensitive-data exposure.
The cost-effective replay plan produces verified resolutions at a sustainable rate. An empty source queue reached through fast movement is not evidence that the business backlog has been cleared.
Primary sources
Amazon SQS: redrive behaviourReferences checked 11 September 2026.