Managing Long Running Tasks hard
What is the primary purpose of a Dead Letter Queue (DLQ)?
- A To store spam.
- B A 'Hospital' for failed messages. If a message fails processing X times (e.g., 5 retry attempts), the queue system automatically moves it to the DLQ so engineers can inspect/debug it later, unblocking the main queue.
- C To delete messages permanently.
- D To encrypt messages.
Answer: B. A 'Hospital' for failed messages. If a message fails processing X times (e.g., 5 retry attempts), the queue system automatically moves it to the DLQ so engineers can inspect/debug it later, unblocking the main queue.
Allows the system to self-heal and isolate bad data.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- The architectural pattern where one service creates tasks and another processes them is called:
- In a Priority Queue system (High vs Low), what is 'Starvation' and how do you fix it?
- How do you atomically update your local database AND publish a message to a queue without losing sync if the process crashes in between?
- What does 'Fire and Forget' mean?
- Why might you 'Throttle' (limit the speed of) your background workers?
- When implementing retries for failed tasks, why use 'Exponential Backoff' with 'Jitter'?