DEV Community

Cover image for Retries, Dead Letter Queues & Parking Lot: API Integration Essentials
Dakshim Chhabra
Dakshim Chhabra

Posted on

Retries, Dead Letter Queues & Parking Lot: API Integration Essentials

Imagine

  • You created a Chat App using ReactJs or NextJs, built APIs using NodeJs, and integrated everything.
  • You're happy and excited to try it out with your best friend.
  • You type: If you can send data over API, you can change the world.
  • But then… your API throws an error.
  • Now what? Should you try again? Should you drop the message? Or maybe hold it for later?

In distributed systems, automations and frontend apps, error handling is as important as the successful transmission of data.

This is where concepts like Retries, Dead Letter Queue (DLQ), and Parking Lot come into play. Let's understand this using Courier service as an analogy.

Retries (Multiple Delivery Attempts)

Imagine a courier comes to your house with a parcel. You're not home.

  • They'll try again in the evening.
  • Maybe one more time the next day.

That's a retry.

In programming, retries handle temporary failures (like network glitches).

Dead Letter Queue (Return to Sender)

What if the courier tries 3 times but still can't deliver? (wrong address, recipient unknown).
The parcel is marked undeliverable and sent back to the sender.

That's a Dead Letter Queue (DLQ), a special place where failed messages live for inspection.

In backend systems, DLQs are common in RabbitMQ, Kafka, AWS SQS, etc.

Parking Lot (Delivery Paused Until You're Ready)

Now imagine this:
Courier calls you. You say,

I'm on vacation, deliver it Monday.

The parcel is held at the local hub until you're available.

That's a Parking Lot Queue, messages are not lost, just waiting to be retried later.

Takeaway

Next time you hear "Retries, DLQ, Parking Lot", just think of your courier guy:

  • Multiple delivery attempts = Retries
  • Return to sender = DLQ
  • Hold until Monday = Parking Lot

And remember: graceful error handling is just as important as success paths, whether you're building with React, Node.js, or distributed systems or an automation using n8n.io or make.com.

Top comments (0)