Dead letters
Eventing 6 · 3:20
When delivery to a receiver keeps failing, the event becomes a dead letter that records its reader and the reason, and you can send it again. The video builds on the channel delivery of Eventing 4.
What it covers
- The delivery block in the channel document, with
retries,retryDelaysand 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:02In video four, a type gave the channel its delivery to the receiver.
- 0:06This video follows one invoice the receiver cannot take, and sends it again.
- 0:14The source publishes an invoice every minute into invoice-files.
- 0:18The subscription forwards it, with its filter and its step.
- 0:22The channel delivers every invoice to the receiver, for now.
- 0:26Two integrations read this channel: the one that delivers, and the watcher.
- 0:35The channel is a document in its own folder.
- 0:38Its delivery block says what happens when a delivery fails.
- 0:41The retries value is three deliveries,
- 0:44and retryDelays puts ten seconds between them.
- 0:47Without the block, the defaults make ten deliveries over about 24 minutes.
- 0:56get readers prints one row per read. A kept channel gives each integration its own durable read,
- 1:03and both rows are at zero.
- 1:06Now the receiver stops, and its card goes grey.
- 1:09The next invoice fails, and the read retries the delivery.
- 1:13Twelve seconds later, the read shows one event retrying.
- 1:18The event stays in the channel for the watcher,
- 1:20whose own read delivered it and stayed at zero.
- 1:23After the last delivery,
- 1:25the event is a dead letter kept with its reader and its reason.
- 1:29The read stands at DEAD one.
- 1:34deadletters list reads the environment's dead letters.
- 1:38One letter is kept, the invoice the receiver refused on every delivery.
- 1:43The row carries its seq, its reader and three deliveries.
- 1:51deadletters show opens one letter by its seq.
- 1:55The print holds the reader, the deliveries, the reason and the body.
- 2:04The same letter stands in the admin UI, under Events.
- 2:09The panel reads Dead letters in devtest, with one row.
- 2:13The opened row carries the reason the delivery failed.
- 2:17The body stands above the buttons Resend and Discard.
- 2:26The receiver is up again.
- 2:28Resend sends the letter to the integration it failed in, and to no other reader.
- 2:33The output names the new event and the one reader it went to.
- 2:37The receiver's log holds the invoice again, at the resend's own time.
- 2:42The copy is removed once it is sent.
- 2:45The list prints no rows now.
- 2:47weikio deadletters discard removes letters you do not want sent.
- 2:56Each durable read retries on its own, and the arrow shows its waits.
- 3:01At the last delivery the event becomes a dead letter,
- 3:04kept with its reader and its reason.
- 3:07The resend sends the letter back to the one reader it failed in.