What is DLQ?
- Handle messages that have not been successfully processed by a consumer
- When a maximum receive count is exceeded, the message will be moved to the DLQ
- DLQ must be of the same type as the source queue (standard or FIFO)
How to use DLQ?
- Configure it on AWS Console or Terraform
- Set an monitors/alarms when messages are placed in DLQ
- Check the messages in DLQ
- Check exception/errors that cause messages are put in DLQ
Maximum receives
- The number of times that a message can be received before being sent to a dead-letter queue
- When waiting time after consumer's receiving messages exceed visibility timeout, receive_count += 1
Redrive
Move message from DLQ back to source queue.