Configure the lock provider
Log in to the Magento server as, or switch to, a user with permissions to write to the Magento file system. See switch to the Magento file system owner.
If you use the bash shell, you can use the following syntax to switch to the Magento file system owner and enter the command at the same time:
su <Magento file system owner> -s /bin/bash -c <command>
If the Magento file system owner does not allow logins, you can do the following:
sudo -u <Magento file system owner> <command>
To run Magento commands from any directory, add
<magento_root>/binto your system
Because shells have differing syntax, consult a reference like unix.stackexchange.com.
Sample bash shell for CentOS:
Optionally, you can run the commands in the following ways:
cd <magento_root>/binand run them as
./magento <command name>
<magento_root>/bin/magento <command name>
<magento_root>is a subdirectory of your web server docroot. Need help locating the docroot?
In addition to the command arguments discussed here, see Common arguments.
Before you run this command, you must do all of the following or you must install the Magento software:
Configure the consumers behaviour
1 magento setup:config:set [--<parameter_name>=<value>, ...]
||Should consumers wait for a message from the queue? 1 - Yes, 0 - No||No|
0—Consumers process available messages in the queue, close the TCP connection, and terminate. Consumers do not wait for additional messages to enter the queue, even if the number of processed messages is less than the
--max_messages value specified during starting consumers.
1—Consumers continue to process messages from the message queue until reaching the maximum number of messages (the value specified for
--max_messages on the
queue:consumers:start command) before closing the TCP connection and terminating the consumer process. If the queue empties before reaching
--max_messages the consumer waits for more messages to arrive. If you use workers to run consumers instead of using a cron job, set this variable to