|
1 | 1 | ## omq
|
2 | 2 |
|
3 |
| -`omq` is a messaging system client for testing purposes. It currently supports AMQP-1.0, STOMP and MQTT 3.1/3.1.1/5.0. |
4 |
| -It is developed mostly for RabbitMQ but might be useful for other brokers as well (some tests against ActiveMQ |
5 |
| -were performed). |
| 3 | +`omq` is a messaging system client for testing purposes. It currently supports AMQP-1.0, STOMP and MQTT 3.1/3.1.1/5.0 |
| 4 | +and partially AMQP 0.9.1 (only for publishing). It is developed mostly for RabbitMQ but might be useful for other brokers |
| 5 | +as well (some tests against ActiveMQ were performed). |
6 | 6 |
|
7 | 7 | `omq` starts a group of publishers and a group of consumers, in both cases all publishers/consumers are identical,
|
8 | 8 | except for the target terminus/queue/routing key, which may be slightly different. The publishers can use
|
@@ -65,6 +65,12 @@ For convenience, if either `--publish-to` or `--consume-from` starts with `/exch
|
65 | 65 | will remove that prefix. RabbitMQ only allows using a single topic exchange with MQTT (`amq.topic` by default), so this prefix doesn't make
|
66 | 66 | much sense. Removing it makes it easier to use the same parameters across protocols.
|
67 | 67 |
|
| 68 | +AMQP 0.9.1 publishers use the same target address as AMQP 1.0: |
| 69 | +* `/queues/foo` will publish to the default exchange with the routing key `foo` |
| 70 | +* `/exchange/bar` will publish to the `bar` exchange with an empty routing key |
| 71 | +* `/exchange/bar/baz` will publish to the `bar` exchange with the routing key `baz` |
| 72 | +* any `--publish-to` value that doesn't match any of the above formats is treated as a routing key for the default exchange |
| 73 | + |
68 | 74 | Read more about how RabbitMQ handles sources and targets in different protocols:
|
69 | 75 | * [AMQP 1.0](https://www.rabbitmq.com/docs/amqp#address-v1) format used by RabbitMQ 3.x
|
70 | 76 | * [AMQP 1.0](https://www.rabbitmq.com/docs/amqp#address-v2) format used by RabbitMQ 4.0+ (the old format is still supported but deprecated)
|
@@ -127,53 +133,5 @@ messages published with perf-test can be consumed by `omq` or vice versa, and th
|
127 | 133 |
|
128 | 134 | ### Options
|
129 | 135 |
|
130 |
| -``` |
131 |
| - --amqp-app-property stringArray AMQP application properties, eg. key1=val1,val2 |
132 |
| - --amqp-app-property-filter stringArray AMQP application property filters, eg. key1=&p:prefix |
133 |
| - --binding-key string AMQP 1.0 consumer binding key |
134 |
| - --amqp-property-filter stringArray AMQP property filters, eg. subject=foo |
135 |
| - --amqp-reject-rate int Rate of messages to reject (0-100%) |
136 |
| - --amqp-release-rate int Rate of messages to release without accepting (0-100%) |
137 |
| - --amqp-subject strings AMQP 1.0 message subject(s), eg. foo,bar,baz |
138 |
| - --amqp-to strings AMQP 1.0 message To field (required for the anonymous terminus) |
139 |
| - --mqtt-consumer-version int MQTT consumer protocol version (3, 4 or 5; default=5) (default 5) |
140 |
| - --mqtt-publisher-clean-session MQTT publisher clean session (default true) |
141 |
| - --mqtt-publisher-qos int MQTT publisher QoS level (0, 1 or 2; default=0) |
142 |
| - --mqtt-publisher-version int MQTT consumer protocol version (3, 4 or 5; default=5) (default 5) |
143 |
| - --binding-key string Binding key for queue declarations |
144 |
| - --cleanup-queues Delete the queues at the end (omq only deletes the queues it explicitly declared) |
145 |
| - -D, --cmessages int The number of messages to consume per consumer (default=MaxInt) (default 9223372036854775807) |
146 |
| - -T, --consume-from string The queue/topic/terminus to consume from (%d will be replaced with the consumer's id) (default "/queues/omq-%d") |
147 |
| - --consumer-credits int AMQP-1.0 consumer credits / STOMP prefetch count (default 1) |
148 |
| - --consumer-id string Client ID for AMQP and MQTT consumers (%d => consumer's id, %r => random) (default "omq-consumer-%d") |
149 |
| - -L, --consumer-latency duration consumer latency (time to accept message) |
150 |
| - --consumer-priority int32 Consumer priority |
151 |
| - --consumer-startup-delay duration Delay consumer startup to allow a backlog of messages to build up (eg. 10s) |
152 |
| - --consumer-uri strings URI for consuming |
153 |
| - -y, --consumers int The number of consumers to start (default 1) |
154 |
| - --expected-instances int The number of instances to synchronize (default 1) |
155 |
| - --expected-instances-endpoint string The DNS name that will return members to synchronize with |
156 |
| - -h, --help help for omq |
157 |
| - -l, --log-level log-level Log level (debug, info, error) (default info) |
158 |
| - --log-out-of-order-messages Print a log line when a message is received that is older than the previously received message |
159 |
| - -c, --max-in-flight int Maximum number of in-flight messages per publisher (default 1) |
160 |
| - -d, --message-durability Mark messages as durable (default true) |
161 |
| - --message-priority string Message priority (0-255, default=unset) |
162 |
| - --message-ttl duration Message TTL (not set by default) |
163 |
| - --metric-tags strings Prometheus label-value pairs, eg. l1=v1,l2=v2 |
164 |
| - -C, --pmessages int The number of messages to send per publisher (default 9223372036854775807) |
165 |
| - --print-all-metrics Print all metrics before exiting |
166 |
| - -t, --publish-to string The topic/terminus to publish to (%d will be replaced with the publisher's id) (default "/queues/omq-%d") |
167 |
| - --publisher-id string Client ID for AMQP and MQTT publishers (%d => consumer's id, %r => random) (default "omq-publisher-%d") |
168 |
| - --publisher-uri strings URI for publishing |
169 |
| - -x, --publishers int The number of publishers to start (default 1) |
170 |
| - --queue-durability queue-durability Queue durability (default: configuration - the queue definition is durable) (default configuration) |
171 |
| - --queues predeclared Type of queues to declare (or predeclared to use existing queues) (default predeclared) |
172 |
| - -r, --rate float32 Messages per second (-1 = unlimited) (default -1) |
173 |
| - -s, --size int Message payload size in bytes (default 12) |
174 |
| - --spread-connections Spread connections across URIs (default true) |
175 |
| - --stream-offset string Stream consumer offset specification (default=next) |
176 |
| - -z, --time duration Run duration (eg. 10s, 5m, 2h) |
177 |
| - --uri strings URI for both publishers and consumers |
178 |
| - -m, --use-millis Use milliseconds for timestamps (automatically enabled when no publishers or no consumers) |
179 |
| -``` |
| 136 | +Use `omq --help` for the full list of options. Keep in mind that some options are protocol-specific and therefore will only |
| 137 | +be printed with the corresponding subcommand. For example `omq mqtt --help` will additionally show MQTT-specific options. |
0 commit comments