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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: phoenix_letter-0.3.7.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for phoenix_letter-0.3.7.tar.gz
Algorithm Hash digest
SHA256 36f524efde66d39b5be9a14cd046e98cc70fd5311504946a9e325f8e33b9ec2e
MD5 1a9e9695392fb7fbeac18109b9aace0b
BLAKE2b-256 8c99c8dfcd047207d5b1c7913747bd69d475a477d538f9a3543c7f7b268c9f97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for phoenix_letter-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 da5b2f2a1ec8fcc33051ee2a7c0415bada49145e818a1035af30a6cb6a432119
MD5 eb82ba3aecf0f4de184635062c7343e6
BLAKE2b-256 c05a9f441318998f91eb7e8e89119789079d093df193ec7cf0c874e26e99c539

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