Dead letters
Eventing 6 · 3:23
When delivery to a receiver keeps failing, the event becomes a dead letter that records its reader and the reason. You can send a dead letter again. The video builds on the channel delivery of Eventing 4.
This part of the video couldn't be loaded.
What it covers
- The
retriesandretryDelaysfields of the channel document's delivery block, and their defaults - One durable reader per integration in
weikio get readers - Retries after the receiver stops, until the event becomes a dead letter
- The letter and its reason in
weikio deadletters listandweikio deadletters show - Finding the letter on the Dead letters page under Events in the admin UI
- Sending the letter again with
weikio deadletters resend, or removing it withdiscard
Commands in this video
Terminal
$ weikio get readers sandbox/invoice-created --env devtest
$ weikio deadletters list --env devtest
$ weikio deadletters show --seq 1 --env devtest
$ weikio deadletters resend --seq 1 --env devtest -yTranscript
- 0:02Earlier Eventing videos built a channel whose deliveries reach the receiver.
- 0:06This video follows an invoice the receiver turns away,
- 0:09from its failed deliveries to a resend.
- 0:15A new invoice lands in invoice-files each minute.
- 0:18The subscription passes it onward, first through its filter, then through its step.
- 0:24Each delivery lands at the receiver, for now.
- 0:27The channel has two readers: the integration that delivers, and invoice-watcher.
- 0:37The channel is now a document of its own.
- 0:39Its delivery block governs a failing delivery:
- 0:42how many deliveries an event gets, and the waits between them.
- 0:46Those values: three deliveries, ten seconds apart.
- 0:50Left at defaults,
- 0:52that event would reach a tenth delivery about twenty four minutes after the first.
- 1:00weikio get readers prints one row per read, both at zero.
- 1:06A channel that keeps its events gives every reader its own durable read in your Weik.io installation.
- 1:13The receiver stops answering.
- 1:15The next delivery fails, then the read retries it after each wait.
- 1:20A little later, the read shows the invoice waiting to go out again.
- 1:24The watcher's read took the same event,
- 1:26because the channel holds it for every reader.
- 1:29When the last delivery fails, the read is done with the event,
- 1:33then a copy enters the environment's dead letters.
- 1:36The letter is filed under the failed read, with the reason.
- 1:42weikio deadletters list shows what this environment holds.
- 1:47One letter waits here, the invoice the receiver turned down.
- 1:51Its row names the integration whose read failed, and its three deliveries.
- 1:56weikio deadletters show prints one letter, picked by number, with the reader it failed in,
- 2:02its deliveries, the reason, the headers and the stored body.
- 2:10The admin UI keeps the same letters, on its Events page.
- 2:14Its one row is that letter.
- 2:17The dialog shows the reason near its top.
- 2:20The body lies above the footer's two buttons: Resend and Discard.
- 2:29The receiver answers again.
- 2:31The letter goes back to only the failed read.
- 2:34The option answers the CLI's confirmation.
- 2:37The print names the new event and the reader it reached.
- 2:41The invoice is back in the receiver's log, written by the resend.
- 2:45The resend also clears the letter's copy from the box.
- 2:49The list prints no letter now.
- 2:51weikio deadletters discard clears letters that should never go out.
- 2:59Each read retries on its own.
- 3:02When its last delivery fails,
- 3:04the event waits in the environment's dead letters with the reader it failed in and the reason.
- 3:10A resend carries the letter to that reader and to no other.