Skip to content

Commit 1754c15

Browse files
Merge pull request #38 from run-as-root/develop
New release
2 parents 46e188f + 9b3aa7d commit 1754c15

File tree

59 files changed

+588
-299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+588
-299
lines changed

Diff for: .DS_Store

6 KB
Binary file not shown.

Diff for: README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ utilizing The RabbitMQ's [dead letter exchange](https://www.rabbitmq.com/dlx.htm
1515
- [How it works](#how-it-works)
1616
- [Configuration](#configuration)
1717
- [Skipping the retry](#skipping-the-retry)
18+
- [Exploring a real scenario](#exploring-a-real-scenario)
1819
- [License](#licence)
1920

2021
---
@@ -64,7 +65,7 @@ The default Magento's consumer behavior is to reject the message when an excepti
6465
If you use a standard configuration for the queue (without a dead-letter exchange), the message will be discarded and not processed again.
6566

6667
This behavior will change a bit with this module. It will introduce an extra step that will check if the message has reached your retry limit,
67-
if so, it will be discarded from RabbitMQ and sent to the `run_as_root_message` Mysql table and stay there until manual management through the admin panel.
68+
if so, it will be discarded from RabbitMQ and sent to the `run_as_root_queue_error_message` Mysql table and stay there until manual management through the admin panel.
6869

6970
If the message has not reached the retry limit, it will be rejected, and RabbitMQ will send it to the dead letter exchange. The message will be routed automatically to the "delay" queue and stay there until de TTL time is reached.
7071
After the TTL time is reached, the message will be returned to its original queue.
@@ -203,6 +204,10 @@ System > Configuration > RUN-AS-ROOT > Message Queue Retry
203204

204205
![img.png](docs/module-configuration.png)
205206

207+
**Note:** The configuration `Total of days to keep the messages` is the period that the messages will stay in the database. After this period, the messages will be deleted automatically by a Cron job.
208+
209+
The `run_as_root_clean_old_queue_error_messages` cron job is scheduled to run every day at 02:00 AM.
210+
206211
---
207212

208213
### Skipping the retry
@@ -219,5 +224,11 @@ For more information of how to configure message queues in Magento 2, you can ta
219224

220225
---
221226

227+
## Exploring a real scenario
228+
229+
If you want to know more about this module and explore a real scenario with it, please, take a look at the [blog post](https://dev.to/run_as_root/preventing-transaction-loss-unleashing-the-power-of-resilient-transactions-with-rabbitmq-dead-letter-exchanges-in-magento-2-8h0) we wrote about it.
230+
231+
---
232+
222233
## License
223234
[MIT](https://opensource.org/licenses/MIT)

Diff for: composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"sniffer": "vendor/bin/phpcs --colors -p ./src --standard=phpcs-ruleset.xml",
6363
"fix-style": "vendor/bin/phpcbf --colors -p ./src --standard=phpcs-ruleset.xml",
6464
"sniffer:php8.1": "vendor/bin/phpcs -p ./src --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.1",
65+
"sniffer:php8.2": "vendor/bin/phpcs -p ./src --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.2",
6566
"mess-detector": "vendor/bin/phpmd src html phpmd-ruleset.xml --exclude \"Test\" --strict --reportfile reports/phpmd/phpmd.html"
6667
}
6768
}

0 commit comments

Comments
 (0)