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.6.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: phoenix_letter-0.3.6.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for phoenix_letter-0.3.6.tar.gz
Algorithm Hash digest
SHA256 b0c4cdd35e67a0144aeda4f31b329a0f45758895cf38e9a7b9ffda89dcea999f
MD5 920888528b533ca59077a5891857dfa6
BLAKE2b-256 51e5b45f53de3f1c189d8d3ac9be1567d26bc04762b655a1dd28d919721d7052

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phoenix_letter-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for phoenix_letter-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4824d2f1aefd85ef64bb5445c7b34d8953775ec3da86b6433d377506be7abb28
MD5 2d7894c1ec0e889d88edbbd263eaa0b9
BLAKE2b-256 8ed477818887d255fa2a15f1971456f2d0ba976afaaa52cdf4304b3b223453db

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