You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,12 @@ utilizing The RabbitMQ's [dead letter exchange](https://www.rabbitmq.com/dlx.htm
18
18
- RabbitMQ
19
19
20
20
To be able to use this module, you have to manually configure the dead letter exchange(s) for the queue(s) you want to enable the retry mechanismm through the `queue_topology.xml` file.
21
-
An example will be given in the Setup section.
21
+
An example will be given in the [Configuration](#configuration) section.
22
22
23
23
Other requisite is that your exchanges have to have a relation from one exchange to only one topic and queue,
24
24
25
25
For example:
26
+
26
27

27
28
28
29
## Installation
@@ -54,10 +55,11 @@ If you use a standard configuration for the queue (without a dead-letter exchang
54
55
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,
55
56
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.
56
57
57
-
If it has not reached the retry limit, the message will be rejected, and RabbitMQ will be sent to the dead letter exchange and routed automatically to the "delay" queue and stay there until de TTL time is reached.
58
-
After the TTL time is reached, the message will be sent to the original queue and processed by the consumer.
58
+
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.
59
+
After the TTL time is reached, the message will be returned to its original queue.
59
60
60
61
The diagram below illustrates both approaches:
62
+
61
63

62
64
63
65
In the admin panel a new grid will be available to manage the messages that have reached the retry limit:
@@ -146,6 +148,7 @@ We need to change these two files in order to declare and configure the delay qu
@@ -158,11 +161,11 @@ We need to change these two files in order to declare and configure the delay qu
158
161
</config>
159
162
```
160
163
161
-
In the `erp_order_export` we added the `x-dead-letter-exchange` and `x-dead-letter-routing-key` arguments to the binding, this will route the message to the `erp_order_export_delay` exchange when the message is rejected.
164
+
In the `erp_order_export`exchange binding, we added the `x-dead-letter-exchange` and `x-dead-letter-routing-key` arguments, this will route the message to the `erp_order_export_delay` exchange when the message is rejected.
162
165
163
-
In the `erp_order_export_delay`we added the same arguments, however it points to the original exchange `erp_order_export` and the TTL time is 300000ms (5 minutes).
166
+
We added the `erp_order_export_delay`exchange and binding, it points to the original exchange (`erp_order_export`). the `x-message-ttl` argument will configure the period that the message will stay in the `erp_order_export_delay` queue, in this example for 5 minutes (300000ms). When the lifetime expires (TTL), RabbitMQ will send the message to `erp_order_export` automatically.
164
167
165
-
The `erp_order_export_delay` queue does not have a consumer, it will be used only to hold(delay) messages according with the period defined in the `x-message-ttl` argument. When the lifetime expires (TTL), RabbitMQ will send the message to `erp_order_export` automatically.
168
+
The `erp_order_export_delay` queue does not have a consumer, it will be used only to hold(delay) messages according with the period defined in the `x-message-ttl` argument.
166
169
167
170
Now you have to define toggle the activation for the retry queue module and declare the retry limit for the queue:
0 commit comments