Posted On: Jun 7, 2023
Today, Amazon Simple Queue Service (SQS) announces support for dead-letter queue redrive via Amazon SDK or Command Line Interface (CLI). Dead-letter queue redrive is an enhanced capability to improve the dead-letter queue management experience for Amazon SQS customers. Amazon SQS already supports dead-letter queue redrive to source queues or a custom destination queue using the Amazon SQS console. Now customers can move the messages from the dead-letter queue using Amazon SDK or CLI to programmatically manage the lifecycle of their unconsumed messages stored in the dead-letter queue at scale. Amazon SQS is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications.
Customers increasingly use distributed systems with event-driven architectures, making their applications more efficient, scalable, and reliable. Sometimes errors occur in the distributed systems, such as a consumer is not able to successfully consume the messages from the queue. In such error cases, Amazon SQS initiates the life cycle of the unconsumed message and moves it to a dead-letter queue if configured. This enables customers to inspect messages that are not consumed successfully and debug their application failures without losing any messages. To programmatically automate dead-letter queue message redrive workflows, customers can now use the following actions:
1) StartMessageMoveTask, to start a new message movement task from the dead-letter queue;
2) CancelMessageMoveTask, to cancel the message movement task;
3) ListMessageMoveTasks, to get 10 most recent message movement tasks for a specified source queue.
Getting started with the dead-letter queue redrive via Amazon SDK and CLI is easy. Please see SQS Documentation for more information on how to programmatically automate dead-letter queue redrive using the Amazon SDK and/or CLI (Amazon SQS Documentation). Customers can also navigate to the Amazon Web Services Console to set up their dead-letter queue redrive.
Dead-letter queue redrive via Amazon SDK and CLI is available in all commercial Amazon Web Services Regions where Amazon SQS is available, including the Amazon Web Services China (Beijing) Region, operated by Sinnet and the Amazon Web Services China (Ningxia) Region, operated by NWCD.
To learn more about dead-letter queue in Amazon SQS, please see Documentation.