Start message queue consumers

In addition to the command arguments described in this topic, see Common arguments.

Run all Magento CLI commands as the file system owner.

You must start a message queue consumer to enable asynchronous operations such as Inventory Management mass actions and REST bulk and asynchronous endpoints. To enable B2B functionality, you must start multiple consumers. Third-party modules might also require that you start a custom consumer.

View a list of available message queue consumers

To view a list of all consumers:

1
bin/magento queue:consumers:list

Start message queue consumers

To start message queue consumers:

1
bin/magento queue:consumers:start [--max-messages=<value>] [--batch-size=<value>] [--single-thread] [--area-code=<value>] <consumer_name>

After consuming all available messages, the command terminates. You can run the command again manually or with a cron job. You can also run multiple instances of the magento queue:consumers:start command to process large message queues. For example, you can append & to the command to run it in the background, return to a prompt, and continue running commands:

1
bin/magento queue:consumers:start <consumer_name> &

See queue:consumers:start in the Magento command-line reference for details about the command options, parameters, and values.

Related topics