The answer from @Rafael CorrĂȘa Gomes (and any to the point that mentions either 'cron_run' => false
or 'consumers' => ['async.operations.all']
in the configuration are quite outrageous because they make many folks copy-paste and destroy their message queues from functioning.
cron_run
set to false
in configuration means that the message consumers are not going to be launched by the Magento cron. It means that you will have to run them using other means like SupervisorD or SystemD. And if not (and those answers don't mention that at all), you will have broken stuff beyond words "message queues", which includes, at very minimum, data export in Magento admin.
The documentation that is being referred to when posting such configuration has incorrect heading below this section with words:
Specific configuration
instead of
Sample configuration
It is a sample, and not a standard. Neither it is a recommendation to solve anything.
But, while the docs are at fault, it doesn't excuse skipping the lines and not reading further, then posting destructive solutions online.
The real solution is either disabling the Bulk API which most installations don't use, essentially:
php bin/magento module:disable Magento_WebapiAsync
Or, configure RabbitMQ if you want the bulk API (highly unlikely, depends on specific use case).
Check app/etc/env.php
. You may be missing the connection configuration.
Add the following element to array in app/etc/env.php:
'queue' => [
'amqp' => [
'host' => 'localhost',
'port' => '5672',
'user' => 'guest',
'password' => 'guest',
'virtualhost' => '/',
'ssl' => ''
]
]
This is just a sample code, you have to modify it according to your requirement.
UPDATE
There are two ways to configure Message Queues in Magento2.
One is using RabbitMQ, if you are using RabbitMQ, then you need to connect to the RabbitMQ server. Above code is for that connection.
Second is using Database and cron, if you are using this setup you need configuration as mentioned at https://devdocs.magento.com/guides/v2.3/config-guide/mq/manage-message-queues.html
UPDATE 2
Check if the connection name in XML files and env.php are same.
Best Answer
Did you take a look at the message queue overview doc?
https://devdocs.magento.com/guides/v2.3/config-guide/mq/rabbitmq-overview.html
This is what's being confirmed as not configured