Tutorial

10.7 Bring it back

curl -X POST http://localhost:5080/dev/supplier/up

The dead letter is still there: fixing the cause does not clear it, because nothing knows the cause was fixed. In the console, open it under Dead letters and choose Requeue. The same, as a member of staff:

LIN=$(curl -s 'http://localhost:5080/dev/token/lin?staff=true')
curl -s http://localhost:5080/trax/graphql -H "Authorization: Bearer $LIN" \
  -H 'Content-Type: application/json' \
  -d '{"query":"{ operations { deadLetters { deadLetters(take: 5) { items { id manifestName status reason } } } } }"}'
{"data":{"operations":{"deadLetters":{"deadLetters":{"items":[{"id":1,"manifestName":"Shopfront.Trains.Restock.IRestockTrain","status":"AWAITING_INTERVENTION","reason":"Max retries exceeded: (3) failures > (2) max retries"}]}}}}}
curl -s http://localhost:5080/trax/graphql -H "Authorization: Bearer $LIN" \
  -H 'Content-Type: application/json' \
  -d '{"query":"mutation { operations { deadLetters { requeueDeadLetter(id: 1) { success message } } } }"}'
{"data":{"operations":{"deadLetters":{"requeueDeadLetter":{"success":true,"message":"Dead letter requeued"}}}}}

The requeue runs at once, with no backoff, and succeeds. The dead letter is resolved, the manifest is back on its schedule, and its failures no longer count toward the next dead letter.

Acknowledge is the other way to resolve one: it records a note and puts the manifest back on its schedule without running it, for a failure that needs no run to make up for it.

SDK Reference

Schedule | AddScheduler | How retries work | Resolve a dead letter | AddLifecycleHook


Next: 10.8 Test it