Skip to content

garryyao/replay-aws-dlq

Repository files navigation

replay-aws-dlq NPM version

Re-drive AWS (dead letter) queue messages to target queue

Installation

$ npm install --save replay-aws-dlq

Usage

The following command will move all messages in [source] queue to [dest] queue where source queue is usually a dead-letter queue, and the destination queue is it's pairing queue.

replay-aws-dlq [source_queue_url] [dest_queue_url]

This module use AWS sdk beneath so you shall be able to use env variables to work across different accounts, e.g. the example below use AWS profile.

AWS_PROFILE=staging replay-aws-dlq  https://sqs.eu-central-1.amazonaws.com/123/my-queue-deadletter.fifo https://sqs.eu-central-1.amazonaws.com/123/my-queue.fifo

Special Note for FIFO queue

Please be aware if destination queue you're driving messages to, is FIFO queue that has enabled deduplication, and messages in DLQ were original come from it, you'll need to cool down for at least 5 mins internal before you can start driving messages back, otherwise you messages will end up not showing in the dest queue.

License

MIT © Garry Yao

About

Replay AWS Dead Letter Queue messages on another queue

Resources

License

Stars

Watchers

Forks

Packages

No packages published