0

I just configured my message queues to run via RabbitMQ, but I don't know the schedule and frequency of these processes.

How could I check the schedule and change the number of processes to be executed?

| improve this question | | | | |
2

The default schedule is every second, as you can see in this core file below.

<!-- /app/code/Magento/MessageQueue/etc/crontab.xml -->

<job name="consumers_runner" instance="Magento\MessageQueue\Model\Cron\ConsumersRunner" method="run">
    <schedule>* * * * *</schedule>
</job>
  • Re-running cron restarts the consumer.
  • Each consumer processes 10000 messages and then terminates

To view a list of all consumers you can run:

bin/magento queue:consumers:list

You can edit your env.php to change the Consumers' runners and the amount to be executed.

'cron_consumers_runner' => array(
        'cron_run' => false,
        'max_messages' => 20000,
        'consumers' => array(
            'consumer1',
            'consumer2',
        )
    ),

Reference: DevDocs - Manage Message Queues

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.