KestrelDocsv2.4
Dashboard
WebhooksRetries and dead letters

Retries and dead letters

When an endpoint fails, Kestrel retries with backoff, then parks the event in a dead-letter queue, so nothing is lost and one bad endpoint never holds up the rest.

Updated Oct 224 min read

How retries work

Changed in v2.4

Events now move to the dead-letter queue after three failed attempts. Before v2.4 they were retried for up to 24 hours.

A delivery fails when the endpoint answers with anything other than a 2xx, takes longer than 15 seconds, or can't be reached. Each retry waits longer than the last, with jitter so a recovering endpoint isn't hit by every event at once.

AttemptSent afterIf it fails
1ImmediatelyRetry in about 1 minute
2~1 minuteRetry in about 10 minutes
3~10 minutesMove to the dead-letter queue

An endpoint that answers 410 Gone is disabled straight away and its pending events are dead-lettered.

The dead-letter queue

Dead-lettered events keep their payload, every attempt and the last error for 7 days. List them per endpoint to see what went wrong.

List dead letters for an endpoint
const parked = await kestrel.deadLetters.list({
  endpointId: "ep_8fK21",
  limit: 20,
});

for (const letter of parked.data) {
  console.log(letter.eventId, letter.lastError);
}

Replaying events

  1. 1Fix the endpoint, or wait until your customer confirms it's back.
  2. 2Open Deliveries, filter by Dead-lettered, and select the events to send again.
  3. 3Choose Replay. Each event is delivered once more and counted as a new attempt.
Replay from code
await kestrel.deadLetters.replay("dl_3Hc9Ve");
Replays can arrive out of order

A replayed event may land after newer events for the same object. Compare the event's created timestamp before overwriting state.

Limits

LimitValue
Attempts per event3
Request timeout15 seconds
Dead-letter retention7 days
Replay rate50 events/s per endpoint
Was this page helpful?
Edit this page
On this page
Edit this page