Skip to content
Theory · Messaging patterns · lesson 1 of 9

Retries, backoff and dead letters

Three delivery attempts 0 1 2 with growing pauses, then the parcel goes to the DLQ warehouse; a parcel with no address goes there at once

A consumer got the message "charge 500 rubles for order 42" and called the payment service, and the service did not answer in time. You can give up and lose the payment. You can retry at once, then again and again. But the service may be silent because it is overloaded with requests, and instant retries will not let it get back up. A retry helps only when it has a reason, a pause and a limit.

In this lesson

  • Which errors to retry
  • When a retry is dangerous
  • Exponential backoff
  • Jitter
  • End of the road: the DLQ
  • Common mistake
  • Key points