|
| 1 | +# Magento2. Cli commands |
| 2 | + |
| 3 | +The enqueue Magento extension provides several commands. |
| 4 | +The most useful one `enqueue:consume` connects to the broker and process the messages. |
| 5 | +Other commands could be useful during debugging (like `enqueue:topics`) or deployment (like `enqueue:setup-broker`). |
| 6 | + |
| 7 | +* [enqueue:consume](#enqueueconsume) |
| 8 | +* [enqueue:produce](#enqueueproduce) |
| 9 | +* [enqueue:setup-broker](#enqueuesetup-broker) |
| 10 | +* [enqueue:queues](#enqueuequeues) |
| 11 | +* [enqueue:topics](#enqueuetopics) |
| 12 | + |
| 13 | +## enqueue:consume |
| 14 | + |
| 15 | +``` |
| 16 | +php bin/magento enqueue:consume --help |
| 17 | +Usage: |
| 18 | + enqueue:consume [options] [--] [<client-queue-names>]... |
| 19 | + enq:c |
| 20 | +
|
| 21 | +Arguments: |
| 22 | + client-queue-names Queues to consume messages from |
| 23 | +
|
| 24 | +Options: |
| 25 | + --message-limit=MESSAGE-LIMIT Consume n messages and exit |
| 26 | + --time-limit=TIME-LIMIT Consume messages during this time |
| 27 | + --memory-limit=MEMORY-LIMIT Consume messages until process reaches this memory limit in MB |
| 28 | + --setup-broker Creates queues, topics, exchanges, binding etc on broker side. |
| 29 | + --idle-timeout=IDLE-TIMEOUT The time in milliseconds queue consumer idle if no message has been received. |
| 30 | + --receive-timeout=RECEIVE-TIMEOUT The time in milliseconds queue consumer waits for a message. |
| 31 | + --skip[=SKIP] Queues to skip consumption of messages from (multiple values allowed) |
| 32 | + -h, --help Display this help message |
| 33 | + -q, --quiet Do not output any message |
| 34 | + -V, --version Display this application version |
| 35 | + --ansi Force ANSI output |
| 36 | + --no-ansi Disable ANSI output |
| 37 | + -n, --no-interaction Do not ask any interactive question |
| 38 | + -e, --env=ENV The environment name [default: "test"] |
| 39 | + --no-debug Switches off debug mode |
| 40 | + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug |
| 41 | +
|
| 42 | +Help: |
| 43 | + A client's worker that processes messages. By default it connects to default queue. It select an appropriate message processor based on a message headers |
| 44 | +``` |
| 45 | + |
| 46 | +## enqueue:produce |
| 47 | + |
| 48 | +``` |
| 49 | +php bin/magento enqueue:produce --help |
| 50 | +Usage: |
| 51 | + enqueue:produce <topic> <message> |
| 52 | + enq:p |
| 53 | +
|
| 54 | +Arguments: |
| 55 | + topic A topic to send message to |
| 56 | + message A message to send |
| 57 | +
|
| 58 | +Options: |
| 59 | + -h, --help Display this help message |
| 60 | + -q, --quiet Do not output any message |
| 61 | + -V, --version Display this application version |
| 62 | + --ansi Force ANSI output |
| 63 | + --no-ansi Disable ANSI output |
| 64 | + -n, --no-interaction Do not ask any interactive question |
| 65 | + -e, --env=ENV The environment name [default: "dev"] |
| 66 | + --no-debug Switches off debug mode |
| 67 | + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug |
| 68 | +
|
| 69 | +Help: |
| 70 | + A command to send a message to topic |
| 71 | +``` |
| 72 | + |
| 73 | +## enqueue:setup-broker |
| 74 | + |
| 75 | +``` |
| 76 | +php bin/magento enqueue:setup-broker --help |
| 77 | +Usage: |
| 78 | + enqueue:setup-broker |
| 79 | + enq:sb |
| 80 | +
|
| 81 | +Options: |
| 82 | + -h, --help Display this help message |
| 83 | + -q, --quiet Do not output any message |
| 84 | + -V, --version Display this application version |
| 85 | + --ansi Force ANSI output |
| 86 | + --no-ansi Disable ANSI output |
| 87 | + -n, --no-interaction Do not ask any interactive question |
| 88 | + -e, --env=ENV The environment name [default: "dev"] |
| 89 | + --no-debug Switches off debug mode |
| 90 | + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug |
| 91 | +
|
| 92 | +Help: |
| 93 | + Creates all required queues |
| 94 | +``` |
| 95 | + |
| 96 | +## enqueue:queues |
| 97 | + |
| 98 | +``` |
| 99 | +php bin/magento enqueue:queues --help |
| 100 | +Usage: |
| 101 | + enqueue:queues |
| 102 | + enq:m:q |
| 103 | + debug:enqueue:queues |
| 104 | +
|
| 105 | +Options: |
| 106 | + -h, --help Display this help message |
| 107 | + -q, --quiet Do not output any message |
| 108 | + -V, --version Display this application version |
| 109 | + --ansi Force ANSI output |
| 110 | + --no-ansi Disable ANSI output |
| 111 | + -n, --no-interaction Do not ask any interactive question |
| 112 | + -e, --env=ENV The environment name [default: "dev"] |
| 113 | + --no-debug Switches off debug mode |
| 114 | + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug |
| 115 | +
|
| 116 | +Help: |
| 117 | + A command shows all available queues and some information about them. |
| 118 | +``` |
| 119 | + |
| 120 | +## enqueue:topics |
| 121 | + |
| 122 | +``` |
| 123 | +php bin/magento enqueue:topics --help |
| 124 | +Usage: |
| 125 | + enqueue:topics |
| 126 | + enq:m:t |
| 127 | + debug:enqueue:topics |
| 128 | +
|
| 129 | +Options: |
| 130 | + -h, --help Display this help message |
| 131 | + -q, --quiet Do not output any message |
| 132 | + -V, --version Display this application version |
| 133 | + --ansi Force ANSI output |
| 134 | + --no-ansi Disable ANSI output |
| 135 | + -n, --no-interaction Do not ask any interactive question |
| 136 | + -e, --env=ENV The environment name [default: "dev"] |
| 137 | + --no-debug Switches off debug mode |
| 138 | + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug |
| 139 | +
|
| 140 | +Help: |
| 141 | + A command shows all available topics and some information about them. |
| 142 | +``` |
| 143 | + |
| 144 | +[back to index](../index.md#magento2) |
| 145 | + |
0 commit comments