# Phoenix Letter [![pypi](https://img.shields.io/pypi/v/phoenix_letter.svg)](https://pypi.org/project/phoenix-letter/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![](https://img.shields.io/pypi/pyversions/phoenix_letter.svg) [![Build Status](https://github.com/renanvieira/phoenix-letter/actions/workflows/python-app.yml/badge.svg)](https://github.com/renanvieira/phoenix-letter/actions/workflows/python-app.yml) ![](coverage.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
Bring your messages back from [Dead Letter Queue](https://en.wikipedia.org/wiki/Dead_letter_queue) with this command line script that helps you moving messages from DLQ back to the main queue for reprocessing [SQS](https://aws.amazon.com/sqs/?nc1=h_ls) 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:
```bash
$ 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](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#configuring-credentials).
* `--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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html#API_ReceiveMessage_RequestParameters)). 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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html).
Raw data
{
"_id": null,
"home_page": "https://github.com/renanvieira/phoenix-letter",
"name": "phoenix-letter",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "AWS,SQS,Queue,DLQ,Dead,Letter,Queue",
"author": "Renan Vieira",
"author_email": "me@renanvieira.net",
"download_url": "https://files.pythonhosted.org/packages/8c/99/c8dfcd047207d5b1c7913747bd69d475a477d538f9a3543c7f7b268c9f97/phoenix_letter-0.3.7.tar.gz",
"platform": null,
"description": "# Phoenix Letter [![pypi](https://img.shields.io/pypi/v/phoenix_letter.svg)](https://pypi.org/project/phoenix-letter/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n![](https://img.shields.io/pypi/pyversions/phoenix_letter.svg) [![Build Status](https://github.com/renanvieira/phoenix-letter/actions/workflows/python-app.yml/badge.svg)](https://github.com/renanvieira/phoenix-letter/actions/workflows/python-app.yml) ![](coverage.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) \n \nBring your messages back from [Dead Letter Queue](https://en.wikipedia.org/wiki/Dead_letter_queue) with this command line script that helps you moving messages from DLQ back to the main queue for reprocessing [SQS](https://aws.amazon.com/sqs/?nc1=h_ls) queues. It also can be used to move messages between queues in SQS.\n\n## Install\n### Manually\n- Mac/Linux: ```python3 setup.py install```\n- Windows: ```py setup.py install```\n### PyPi \n- `pip install phoenix_letter`\n\n## Usage\n\nAfter installation you will have a command with the following params:\n```bash\n$ phoenix_letter --help\nusage: phoenix_letter [-h] --src SOURCE_QUEUE --dst DESTINATION_QUEUE [--aws-keys] --region REGION [--empty-receive EMPTY_RECEIVE] [--max N] [--max-per-request N]\n\noptional arguments:\n -h, --help show this help message and exit\n --src SOURCE_QUEUE Source SQS Queue Name\n --dst DESTINATION_QUEUE\n Destination SQS Queue Name\n --aws-keys Flag that indicates you want to enter custom AWS keys.\n --region REGION AWS Region\n --empty-receive EMPTY_RECEIVE\n Max number of empty receives before giving up\n --max N Max number of messages to process from the source queue.\n --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)\n --fifo Flag that indicates you want to interact with a FIFO queue.\n --group-id MESSAGE_GROUP_ID\n Value for the MessageGroupId (used in FIFO queues). Required if '--fifo' argument is passed. Default: NULL.\n```\n\n* `--src`: Source Queue Name\n* `--dst`: Destination Queue Name\n* `--aws-keys`: _[OPTIONAL]_ The CLI will prompt you to enter the AWS keys securely. Default: Fallback to Boto, more information [here](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#configuring-credentials).\n* `--region`: AWS Region.\n* `--empty-receive`: _[OPTIONAL]_[**default value=10**] Number of empty receives before the script gives up trying to get message from queue.*\n* `--empty-receive`: _[OPTIONAL]_[**default value=10**] Number of empty receives before the script gives up trying to get message from queue.*\n* `--max`: _[OPTIONAL]_[**default value=0**] Number of messages to process from the source queue. _`0` means everything_*\n* `--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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html#API_ReceiveMessage_RequestParameters)). Default: 10 (AWS API max limit)\n* `--fifo`: _[OPTIONAL]_[**default value=False**] Argument that indicates that it will connect to a FIFO queue\n* `--group-id`: _[OPTIONAL]_[**default value=None**] If you pass `--fifo` this will be a required argument, otherwise, it will be ignored.\n\n\\* Sometimes the SQS returns false empty receives, where there is messages on queue but for some reason AWS decided not \nreturn anything on that requests. To understand more [here a link from AWS docs](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CLI to move messages from a AWS SQS Queue to another",
"version": "0.3.7",
"split_keywords": [
"aws",
"sqs",
"queue",
"dlq",
"dead",
"letter",
"queue"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "eb82ba3aecf0f4de184635062c7343e6",
"sha256": "da5b2f2a1ec8fcc33051ee2a7c0415bada49145e818a1035af30a6cb6a432119"
},
"downloads": -1,
"filename": "phoenix_letter-0.3.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eb82ba3aecf0f4de184635062c7343e6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7233,
"upload_time": "2022-12-20T10:06:04",
"upload_time_iso_8601": "2022-12-20T10:06:04.327918Z",
"url": "https://files.pythonhosted.org/packages/c0/5a/9f441318998f91eb7e8e89119789079d093df193ec7cf0c874e26e99c539/phoenix_letter-0.3.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "1a9e9695392fb7fbeac18109b9aace0b",
"sha256": "36f524efde66d39b5be9a14cd046e98cc70fd5311504946a9e325f8e33b9ec2e"
},
"downloads": -1,
"filename": "phoenix_letter-0.3.7.tar.gz",
"has_sig": false,
"md5_digest": "1a9e9695392fb7fbeac18109b9aace0b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 6145,
"upload_time": "2022-12-20T10:06:05",
"upload_time_iso_8601": "2022-12-20T10:06:05.875106Z",
"url": "https://files.pythonhosted.org/packages/8c/99/c8dfcd047207d5b1c7913747bd69d475a477d538f9a3543c7f7b268c9f97/phoenix_letter-0.3.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-20 10:06:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "renanvieira",
"github_project": "phoenix-letter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "phoenix-letter"
}