Skip to main content

CLI to move messages from a AWS SQS Queue to another

Project description

Phoenix Letter pypi

Code style: black Build Status License: MIT

Bring your messages back from Dead Letter Queue with this command line script that helps you moving messages from DLQ back to the main queue for reprocessing SQS queues. It also can be used to move messages between queues in SQS.

Install

Manually

  • Mac/Linux: python3 setup.py install
  • Windows: py setup.py install

PyPi

  • pip install phoenix_letter

Usage

After installation you will have a command with the following params:

$   phoenix_letter --help
usage: phoenix_letter [-h] --src SOURCE_QUEUE --dst DESTINATION_QUEUE [--aws-keys] --region REGION [--empty-receive EMPTY_RECEIVE] [--max N] [--max-per-request N]

optional arguments:
  -h, --help            show this help message and exit
  --src SOURCE_QUEUE    Source SQS Queue Name
  --dst DESTINATION_QUEUE
                        Destination SQS Queue Name
  --aws-keys            Flag that indicates you want to enter custom AWS keys.
  --region REGION       AWS Region
  --empty-receive EMPTY_RECEIVE
                        Max number of empty receives before giving up
  --max N               Max number of messages to process from the source queue.
  --max-per-request N   Max number of messages to received from the source queue per request (this will be pass in the MaxNumberOfMessages param). Default: 10 (AWS API max limit)
  --fifo                Flag that indicates you want to interact with a FIFO queue.
  --group-id MESSAGE_GROUP_ID
                        Value for the MessageGroupId (used in FIFO queues). Required if '--fifo' argument is passed. Default: NULL.
  • --src: Source Queue Name
  • --dst: Destination Queue Name
  • --aws-keys: [OPTIONAL] The CLI will prompt you to enter the AWS keys securely. Default: Fallback to Boto, more information here.
  • --region: AWS Region.
  • --empty-receive: [OPTIONAL][default value=10] Number of empty receives before the script gives up trying to get message from queue.*
  • --empty-receive: [OPTIONAL][default value=10] Number of empty receives before the script gives up trying to get message from queue.*
  • --max: [OPTIONAL][default value=0] Number of messages to process from the source queue. 0 means everything*
  • --max-per-request: [OPTIONAL][default value=10] Max number of messages to received from the source queue per request (this will be pass in the MaxNumberOfMessages param). Default: 10 (AWS API max limit)
  • --fifo: [OPTIONAL][default value=False] Argument that indicates that it will connect to a FIFO queue
  • --group-id: [OPTIONAL][default value=None] If you pass --fifo this will be a required argument, otherwise, it will be ignored.

* Sometimes the SQS returns false empty receives, where there is messages on queue but for some reason AWS decided not return anything on that requests. To understand more here a link from AWS docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phoenix_letter-0.3.5.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

phoenix_letter-0.3.5-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file phoenix_letter-0.3.5.tar.gz.

File metadata

  • Download URL: phoenix_letter-0.3.5.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.9

File hashes

Hashes for phoenix_letter-0.3.5.tar.gz
Algorithm Hash digest
SHA256 bcbe56a3a89aae12a9e0605a780410b399bfc18323348c2fc6d8cb143f73f23f
MD5 639e3fdca3de39788b6f958d363c3c14
BLAKE2b-256 9b8d64a61e9941dd1b8cdfe82102fc0c8bcdba95f78020cde16b1ceed320b407

See more details on using hashes here.

File details

Details for the file phoenix_letter-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: phoenix_letter-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.9

File hashes

Hashes for phoenix_letter-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e150112aa56ccfdfa5ca944f1cd783c4f7439cb7fb06c0c4b329323bdcc7a699
MD5 8b42996b51b45cd9c477dac9798d1e0e
BLAKE2b-256 b18feadf8af2490d3e423f4262ec4e4e9d844da88324ed78cbf0434089bc85b4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page