Configuration
Behavior by default
- Cron job
consumers_runner
is enabled - Cron job
consumers_runner
runs all defined consumers - Each consumer processes 10000 messages and then terminates
If your Adobe Commerce store is hosted on the Cloud platform, use the
CRON_CONSUMERS_RUNNER
to configure the consumers_runner
cron job.Specific configuration
Edit the /app/etc/env.php
file to configure the cron job consumers_runner
.
...
'cron_consumers_runner' => [
'cron_run' => false,
'max_messages' => 20000,
'consumers' => [
'consumer1',
'consumer2',
],
'multiple_processes' => [
'consumer1' => 4
]
],
...
-
cron_run
- A boolean value that enables or disables theconsumers_runner
cron job (default =true
). -
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. Seeconsumers_wait_for_messages
to configure how consumers process messages from the message queue. -
consumers
- An array of strings specifying which consumers to run. An empty array runs all consumers. -
multiple_processes
- An array of key-value pairs specifying which consumer to run in how many processes. Supported in Commerce 2.4.4 or greater.INFO
It is not recommended to run multiple consumers on a MySQL-operated queue. See Change message queue from MySQL to AMQP for more information.INFO
If your Adobe Commerce store is hosted on the Cloud platform, use theCONSUMERS_WAIT_FOR_MAX_MESSAGES
to configure how consumers process messages from the message queue.
Previous pageMessage queue framework
Next pageSet up Amazon MQ