Pergunta

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?

Foi útil?

Solução

The default schedule is every minute, 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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top