AWS SQS - 3rd SQS queue - Dead Letter Queue

AWS SQS - 3rd SQS queue - Dead Letter Queue

Tags
Engineering
AWS
SQS
Created
Dec 28, 2022 04:14 AM
Edited
Jan 2, 2022
Description
Dead letter queue to process failed messages

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?

  1. Configure it on AWS Console or Terraform
  1. Set an monitors/alarms when messages are placed in DLQ
  1. Check the messages in DLQ
  1. 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.
notion image

Related Articles