Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 7ad9ae8

Browse files
authored
Merge pull request #932 from magento/kh_2.2_mq
Update queue:consumers:start
2 parents 91d4082 + cc13d15 commit 7ad9ae8

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

guides/v2.1/config-guide/mq/manage-mysql.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
layout: default
33
group: config-guide
44
subgroup: 15_RabbitMQ
5-
title: Manage message queues with MySQL
6-
menu_title: MySQL message queues
5+
title: Manage message queues
6+
menu_title: Manage message queues
77
menu_order: 3
8-
version: 2.0
8+
version: 2.1
99
github_link: config-guide/mq/manage-mysql.md
1010
---
1111

1212

13-
If you do not want to implement the RabbitMQ solution, you can manage message queues with cron jobs (or an external process manager)and the CLI to ensure that consumers are retrieving messages.
13+
If you do not want to implement the RabbitMQ solution, you can manage message queues with cron jobs (or an external process manager) and the CLI to ensure that consumers are retrieving messages.
1414

15-
<h2>Process management</h2>
15+
## Process management
1616

1717
Cron jobs are the default mechanism to restart consumers. Processes started by `cron` consume the specified number of messages, then die after that. Re-running `cron` restarts the consumer.
1818

@@ -32,30 +32,30 @@ See <a href="{{page.baseurl}}config-guide/cli/config-cli-subcommands-cron.html">
3232

3333
You can also use a process manager such as <a href="http://supervisord.org/index.html">Supervisor</a> to monitor the status of processes. The manager can use the CLI to restart the processes as needed.
3434

35-
<h2>Command line interface</h2>
35+
## Command line interface
3636

37-
<h3>Start consumers</h3>
37+
### Start consumers
3838

39-
The CLI can be used to start consumers of the messages from the queue. Multiple consumers can be started at a same time.
39+
Use the `magento` command to start the message queue consumer.
4040

4141
`./bin/magento queue:consumers:start <consumer_name> [--max-messages=<value>]`
4242

4343
where:
4444

4545
`<consumer_name>` is the consumer to start.
4646

47-
`--max-messages=<value>` defines the maximum number of messages to consume per invocation. If number of messages are less then defined maximum number of messages, then the consumer will receive all the available messages in a queue.
47+
`--max-messages=<value>` defines the maximum number of messages to consume per invocation. If the number of queued messages is less than the specified maximum number of messages, if there are fewer than the specified number of messages in the queue, the consumer will poll for new messages until it has processed that number of messages. The command can be launched again with cron within a configured period of time, or manually.
4848

49-
If `--max-messages` is not defined, the consumer continues to receive endless number of new messages
49+
Unless the `max-messages` option is specified, the process runs continuously.
5050

51-
After getting all available messages, the CLI command terminates. The command can be launched again with cron within a configured period of time, or manually.
51+
### List consumers
5252

53-
<h3>List consumers</h3>
5453
Use the following command to return a list of message queue consumers:
5554

5655
` ./bin/magento queue:consumers:list`
5756

5857
#### Related Topics
58+
5959
* <a href="{{page.baseurl}}config-guide/mq/rabbitmq-overview.html">RabbitMQ Overview</a>
6060
* <a href="{{page.baseurl}}config-guide/mq/config-mq.html">Configure message queues</a>
6161
* <a href="{{page.baseurl}}config-guide/cli/config-cli-subcommands-cron.html">Configure and run cron</a>

guides/v2.2/config-guide/mq/manage-mysql.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
layout: default
33
group: config-guide
44
subgroup: 15_RabbitMQ
5-
title: Manage message queues with MySQL
6-
menu_title: MySQL message queues
5+
title: Manage message queues
6+
menu_title: Manage message queues
77
menu_order: 3
88
version: 2.0
99
github_link: config-guide/mq/manage-mysql.md
@@ -44,15 +44,13 @@ where:
4444

4545
`<consumer_name>` is the consumer to start.
4646

47-
`--max-messages=<value>` defines the maximum number of messages to consume per invocation. If number of messages are less then defined maximum number of messages, then the consumer will receive all the available messages in a queue.
47+
`--max-messages=<value>` defines the maximum number of messages to consume per invocation. If the number of queued messages is less than the specified maximum number of messages, if there are fewer than the specified number of messages in the queue, the consumer will poll for new messages until it has processed that number of messages. The command can be launched again with cron within a configured period of time, or manually.
4848

49-
If `--max-messages` is not defined, the consumer continues to receive endless number of new messages
49+
If `--max-messages` is not specified, the process runs continuously.
5050

51-
After getting all available messages, the CLI command terminates. The command can be launched again with cron within a configured period of time, or manually.
51+
`--batch-size=<value>` defines the number of messages to consume per batch. If specified, messages in a queue are consumed in batches of `<value>` each. This option is applicable for the batch consumer only.
5252

53-
`--batch-size=<value>` defines the number of messages to consume per batch. If specified, messages in a queue are consumed in batches of `<value>` each. This option is applicable for the batch consumer only.
54-
55-
If `--batch-size` is not defined, the batch consumer receives all available messages in a queue.”
53+
If `--batch-size` is not defined, the batch consumer receives all available messages in a queue.
5654

5755
<h3>List consumers</h3>
5856
Use the following command to return a list of message queue consumers:

0 commit comments

Comments
 (0)