> For the complete documentation index, see [llms.txt](https://karansingh.gitbook.io/aws-saa-c02/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://karansingh.gitbook.io/aws-saa-c02/simple-queue-service-sqs/dead-letter-queues.md).

# Dead Letter Queues

* **If a message can't be consumed successfully**, you can send it to a dead-letter queue (DLQ).<br>
* Dead-letter queues **let you isolate problematic messages to determine why they are failing**.<br>
* The **`Maximum receives` value determines when a message will be sent to the DLQ**.<br>
* Dead-letter queues are **useful for debugging your application or messaging system**.

## How do dead-letter queues work?

* **Sometimes, messages can’t be processed** because of a variety of possible issues, such as erroneous conditions within the producer or consumer application.<br>
* For example, if a user places a **web order with a particular product ID, but the product ID is deleted, the web store's code fails** and displays an error, and the **message with the order request is sent to a dead-letter queue**.
