Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Message Queue
    • Overview
    • Message queues
    • Messages
    • Deduplication
    • Visibility timeout
    • Long Polling
    • What is a Dead Letter Queue (DLQ)?
    • Delay queues
    • Quotas and limits
    • Queue labels
    • Comparison with Yandex Data Streams
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events
  • Monitoring metrics
  • Public materials
  • FAQ

In this article:

  • The redrive policy
  • When to use a DLQ
  • With standard queues
  • With FIFO queues
  1. Concepts
  2. What is a Dead Letter Queue (DLQ)?

What is Dead Letter Queue (DLQ)?

Written by
Yandex Cloud
Updated at February 10, 2023
View in Markdown
  • The redrive policy
  • When to use a DLQ
    • With standard queues
    • With FIFO queues

The Dead Letter Queue (DLQ) is a queue for messages that consumers couldn't process in standard queues. There are many reasons for problems with message processing, such as unexpected state changes in producers or consumers. Messages that are moved to the DLQ are stored there for analysis and no longer affect the activity of applications.

A message can be moved to the DLQ after a set number of unsuccessful attempts to process it. Each queue has a redrive policy that defines the number of processing attempts and the ID of the DLQ.

The redrive policyThe redrive policy

The redrive policy defines the conditions for moving messages to the DLQ.

To configure the redrive policy, use the Redrive policy attribute in the CreateQueue and SetQueueAttributes methods.

This attribute specifies the DLQ to move the message to and the maxReceiveCount parameter, which indicates the maximum number of processing attempts before moving a message to the DLQ. When the ReceiveCount value for the message exceeds the value of maxReceiveCount, the message is moved to the DLQ. The message keeps its ID after moving to the DLQ.

When to use a DLQWhen to use a DLQ

With standard queuesWith standard queues

Use a DLQ with standard queues when message delivery order is not important. Standard queues keep messages until the end of the retention period. When the retention period expires, the message is removed from the queue.

If you need to process a large number of messages including those unsuccessfully processed by consumers, use DLQs. This helps isolate problematic messages from a source queue after several unsuccessful processing attempts instead of saving them until the retention period expires. This can lower costs and reduce the load on hardware and virtual machines. A large number of unprocessed messages in standard queues may slow down your applications.

For standard queues, the DLQ must also be a standard queue.

With FIFO queuesWith FIFO queues

Using a DLQ with FIFO queues may affect the message processing order. If processing fails for one of the messages in a group, processing is blocked for the entire group. A consumer can't continue processing this message group until the problematic message is successfully processed. Make sure that your application processes all messages successfully, otherwise the entire FIFO queue may be blocked because of a problematic message.

For FIFO queues, the DLQ must also be created as a FIFO queue.

Was the article helpful?

Previous
Long Polling
Next
Delay queues
© 2026 Direct Cursus Technology L.L.C.