https://github.com/seppevs/move-sqs
Move all SQS messages from one queue to another, with an ability to modify the message in flight
https://github.com/seppevs/move-sqs
amazon aws deadletter messages move queue sqs
Last synced: 7 months ago
JSON representation
Move all SQS messages from one queue to another, with an ability to modify the message in flight
- Host: GitHub
- URL: https://github.com/seppevs/move-sqs
- Owner: seppevs
- License: mit
- Created: 2019-02-15T14:26:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-03T04:24:33.000Z (about 4 years ago)
- Last Synced: 2025-02-21T07:17:09.833Z (8 months ago)
- Topics: amazon, aws, deadletter, messages, move, queue, sqs
- Language: JavaScript
- Homepage:
- Size: 332 KB
- Stars: 13
- Watchers: 2
- Forks: 7
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# move-sqs
Move all SQS messages from one queue to another, with an ability to modify the message✨ [](https://travis-ci.org/seppevs/move-sqs) [](https://coveralls.io/r/seppevs/move-sqs) [](https://www.npmjs.org/package/move-sqs) [](https://www.npmjs.org/package/move-sqs) [](https://david-dm.org/seppevs/move-sqs) [](https://snyk.io/test/github/seppevs/move-sqs) ✨
## Why?
This can be helpful when you want to reprocess all messages from a deadletter queue.## Installation
````bash
$ npm install -g move-sqs
````## Usage Help
```
$ move-sqs --help
Move all SQS messages from one queue to another, with an ability to modify the messageUsage
$ move-sqsOptions
--source-queue-url, -s Source AWS SQS Queue URL
--destination-queue-url, -d Destination AWS SQS Queue URL
--region, -r AWS Region
--access-key-id, -k AWS Access Key ID
--secret-access-key, -S AWS Secret Access Key
--merge-json-message-with, -o (OPTIONAL) Merge the json message body with a given json string
```## Examples
### Basis usage:
`
$ move-sqs --sourceQueueUrl \"https://sqs.eu-west-1.amazonaws.com/123456789012/from-queue" --destinationQueueUrl "https://sqs.eu-west-1.amazonaws.com/123456789012/to-queue" --region "eu-west-1" --accessKeyId "YourAwsAccessKeyId" --secretAccessKey "YourAwsSecretKey"
`### With --merge-json-message-with
`
$ move-sqs --sourceQueueUrl "https://sqs.eu-west-1.amazonaws.com/123456789012/from-queue" --destinationQueueUrl "https://sqs.eu-west-1.amazonaws.com/123456789012/to-queue" --region "eu-west-1" --accessKeyId "YourAwsAccessKeyId" --secretAccessKey "YourAwsSecretKey" --merge-json-message-with "{\"someAttribute\": \"weWantToChangeOrSet\"}"
`The `--merge-json-message-with` argument is optional.
You can use it to modify the message body. The tool will parse the message body as json + parse your input as json.
Then it will perform a merge of the two and send the result to the destination queue.