The payment provider is responding again. The workers are healthy. There are still 600 credit jobs in a dead-letter queue, and some customers are waiting for money. The tempting move is to send everything back to the workers. The first question is how many of those credits the provider already issued.
That queue contains evidence of a processing failure. A message can land there after the worker gave up waiting for a response, even if the other system accepted the request. A green dashboard says the next request has a better chance of getting through. It tells you very little about what happened to the last one.
Find out what entered quarantine
Start with the failing operation, the affected time window, and the worker version. Group a sample by error, schema version, and dependency. Pull in jobs from the start and end of the spike and from any older backlog. One timeout can be the signature of an outage. A different error on a different deployment may deserve a separate recovery. A dead-letter queue can accumulate both.
Keep a record of the application operation ID, the failure reason, the worker version, and the current disposition. Use references to the relevant logs and records. A recovery sheet doesn't need copies of payment data or entire message bodies. Check how much queue retention is left early enough to preserve the evidence you need. In Amazon SQS, standard-queue messages keep their original enqueue timestamp when moved to a dead-letter queue for expiration purposes. Time spent waiting in the source queue can eat into the window you have to inspect them. Amazon SQS dead-letter queue guidance
Then decide which failures the fix actually addresses. In the fictional credit incident, the provider outage explains a group of timeouts. A second group failed because the worker could not parse an older payload. A third contains requests the provider explicitly rejected because the original charge was ineligible. Each group gets its own disposition.
- Temporary failure. The dependency is available again. Reconcile any uncertain outcome before admitting the operation to replay.
- Incompatible payload. Keep the original evidence. Verify that a corrected reader can interpret the old format, or reconstruct the job from the authoritative business record and preserve its operation ID. A fresh timestamp on an unverified payload changes very little.
- Permanent rejection. Record the reason and route any remaining business obligation to an owner. More deliveries of the same request will consume capacity and may bury a failure that someone needs to resolve.
- Stale or superseded request. Check whether the business still wants the operation performed. An authorized request from yesterday can be obsolete after a cancellation or a manual correction today.
Look up the effect before trying again
Use the original credit ID to look up the local ledger and, if the provider supports it, the provider's authoritative record. A worker log saying “request timed out” cannot settle whether a credit posted. An absent result in an eventually consistent read might leave you in the same position. Write down what qualifies as a definitive result for this operation.
If there is already a confirmed credit, reconcile the missing local state and count the operation as complete. If the provider confirms the original request had no effect, check that the credit is still authorized and that your current worker can safely issue it. If the outcome remains uncertain, leave the job on hold until someone can reconcile it. A provider idempotency key can help only within the provider's documented contract. Check its retention window before using it to justify replay of an old message.
The application operation ID should survive the trip through quarantine. Broker message IDs can change, and two messages might represent the same credit. Send the original operation ID and use the worker's existing duplicate protection. The redelivery guide covers how to make the worker's durable record and acknowledgment behave when delivery repeats.
Replay a small set you can account for
Start with a manifest of approved operation IDs and their expected outcomes. Say the team approves five credits with documented authorization, confirmed absence at the provider, and support for the original idempotency keys. Record who is operating the replay, which queue and worker version will process it, and how to stop submitting work. If there's already a replay running, resolve ownership before starting another.
Send those five through the normal worker path at a rate the provider and workers can absorb alongside fresh traffic. Choose a set small enough to reconcile one by one but representative of the specific group you intend to recover. If there's a second payload version or a different worker path, qualify it separately. A success from today's schema says little about a parser that failed on yesterday's.
The built-in SQS redrive task moves messages to the source queue or another queue of the same type. It supports a rate limit, but it can't filter or modify messages in flight. A low rate on a mixed dead-letter queue can still pick an ineligible credit first. For a selected replay, build the approved cohort using a recovery path that can inspect and select work, such as publishing validated jobs from the authoritative records to a dedicated recovery queue. Track durable handoff and final disposition before removing original evidence. Assume the recovery process itself can be interrupted and repeat a submission. AWS also documents that new traffic can interleave with redriven messages at the destination, even in a FIFO queue. Validate ordering in the business operation if dependable sequence matters. Amazon SQS redrive documentation
Count credits, then raise the rate
For each of the five operations, verify one posted credit for the expected customer and amount, a matching final ledger entry, and no second posting. Wait for the provider's normal reporting delay before treating a missing result as a failure. A queue that has drained may contain no more deliveries to make while the customer still sees no credit.
Stop the replay for any duplicate effect, an unexpected job returning to quarantine, or a result that stays ambiguous beyond the reconciliation window. Set a bound for the live queue's age and for dependency throttling before you ramp. Pause at that bound so customers with new work keep moving. Stopping a redrive stops further moves. Jobs already moved can still run, so account for in-flight work before restarting anything.
Once the pilot matches the manifest, increase the rate in steps and repeat the same checks. At the end, every original operation needs a disposition: completed, already complete and reconciled, permanently rejected with an owner, or held for investigation. Count by business operation and keep hold reasons visible. The useful recovery report says which customers received the credits they were due and who owns the remainder.