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
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src/guides/v2.3/config-guide/mq/manage-message-queues.md
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,12 @@ Edit the `/app/etc/env.php` file to configure the cron job `consumers_runner`.
59
59
```
60
60
61
61
*`cron_run` - A boolean value that enables or disables the `consumers_runner` cron job (default = `true`).
62
-
*`max_messages` - The maximum number of messages each consumer must process before terminating (default = `10000`). Although we do not recommend it, you can use 0 to prevent the consumer from terminating.
62
+
*`max_messages` - The maximum number of messages each consumer must process before terminating (default = `10000`). Although we do not recommend it, you can use 0 to prevent the consumer from terminating. See [`consumers_wait_for_messages`]({{ page.baseurl }}/config-guide/prod/config-reference-envphp.html#consumers_wait_for_messages) to configure how consumers process messages from the message queue.
63
63
*`consumers` - An array of strings specifying which consumer(s) to run. An empty array runs *all* consumers.
64
64
65
+
{:.bs-callout-info}
66
+
If your {{ site.data.var.ee }} store is hosted on the Cloud platform, use the [`CONSUMERS_WAIT_FOR_MAX_MESSAGES`]({{ site.baseurl }}/cloud/env/variables-deploy.html#consumers_wait_for_max_messages) to configure how consumers process messages from the message queue.
|`resource`| Mapping of resource name to a connection |
27
+
|`session`| Session storage data |
28
+
|`x-frame-options`| Setting for [x-frame-options][x-frame-options]|
28
29
29
30
## backend
30
31
@@ -62,6 +63,26 @@ All the Magento cache types configuration are available from this node.
62
63
63
64
Learn more about different [Cache Types][cache-types].
64
65
66
+
## consumers_wait_for_messages
67
+
68
+
Specify whether consumers should continue polling for messages if the number of processed messages is less than the `max_messages` value. The default value is `1`.
69
+
70
+
```conf
71
+
'queue' => [
72
+
'consumers_wait_for_messages' => 1
73
+
]
74
+
```
75
+
76
+
The following options are available:
77
+
78
+
-`1`—Consumers continue to process messages from the message queue until reaching the `max_messages` value specified in the `env.php` file before closing the TCP connection and terminating the consumer process. If the queue empties before reaching the `max_messages` value, the consumer waits for more messages to arrive.
79
+
80
+
We recommend this setting for large merchants because a constant message flow is expected and delays in processing are undesirable.
81
+
82
+
-`0`—Consumers process available messages in the queue, close the TCP connection, and terminate. Consumers do not wait for additional messages to enter the queue, even if the number of processed messages is less than the `max_messages` value specified in the `env.php` file. This can help prevent issues with cron jobs caused by long delays in message queue processing.
83
+
84
+
We recommend this setting for smaller merchants that do not expect a constant message flow and prefer to conserve computing resources in exchange for minor processing delays when there could be no messages for days.
85
+
65
86
## cron
66
87
67
88
Enable or disable cron jobs for the Magento application. By default, cron jobs are enabled. To disable them, add the `cron` configuration to the `env.php` file and set the value to `0`.
0 commit comments