1RABBITMQ-STREAMS(8) BSD System Manager's Manual RABBITMQ-STREAMS(8)
2
4 rabbitmq-streams — RabbitMQ stream management tools
5
7 rabbitmq-streams [-q] [-s] [-l] [-n node] [-t timeout] command
8 [command_options]
9
11 rabbitmq-streams is a command line tool that provides commands used to
12 manage streams, for example, add or delete stream replicas. See the
13 RabbitMQ streams overview: https://www.rabbitmq.com/streams.html
14
16 -n node
17 Default node is "rabbit@target-hostname", where target-hostname
18 is the local host. On a host named "myserver.example.com", the
19 node name will usually be "rabbit@myserver" (unless
20 RABBITMQ_NODENAME has been overridden). The output of "hostname
21 -s" is usually the correct suffix to use after the "@" sign. See
22 rabbitmq-server(8) for details of configuring a RabbitMQ node.
23
24 -q, --quiet
25 Quiet output mode is selected. Informational messages are re‐
26 duced when quiet mode is in effect.
27
28 -s, --silent
29 Silent output mode is selected. Informational messages are re‐
30 duced and table headers are suppressed when silent mode is in ef‐
31 fect.
32
33 -t timeout, --timeout timeout
34 Operation timeout in seconds. Not all commands support timeouts.
35 Default is infinity.
36
37 -l, --longnames
38 Must be specified when the cluster is configured to use long
39 (FQDN) node names. To learn more, see the RabbitMQ Clustering
40 guide: https://www.rabbitmq.com/clustering.html
41
42 --erlang-cookie cookie
43 Shared secret to use to authenticate to the target node. Prefer
44 using a local file or the RABBITMQ_ERLANG_COOKIE environment
45 variable instead of specifying this option on the command line.
46 To learn more, see the RabbitMQ CLI Tools guide:
47 https://www.rabbitmq.com/cli.html
48
50 help
51
52 Displays general help and commands supported by rabbitmq-streams.
53
54 Replication
55 add_replica queue node --vhost virtual-host
56
57 Adds a stream replica on the given node.
58
59 Example:
60 rabbitmq-streams add_replica --vhost "a-vhost" "a-queue"
61 "rabbit@new-node"
62
63 delete_replica queue node --vhost virtual-host
64
65 Removes a stream replica on the given node.
66
67 Example:
68 rabbitmq-streams delete_replica --vhost "a-vhost" "a-queue"
69 "rabbit@decomissioned-node"
70
71 Monitoring, observability and health checks
72 stream_status stream --vhost virtual-host
73
74 Displays the status of a stream.
75
76 Example:
77 rabbitmq-streams stream_status --vhost "a-vhost" "a-stream"
78
79 Policies
80 set_stream_retention_policy stream policy --vhost virtual-host
81
82 Set the retention policy of a stream.
83
84 Example:
85 rabbitmq-streams set_stream_retention_policy --vhost
86 "a-vhost" "a-stream" "a-policy"
87
88 Stream plugin
89 list_stream_connections [connectioninfoitem ...]
90
91 Returns stream protocol connection statistics.
92
93 The connectioninfoitem parameter is used to indicate which con‐
94 nection information items to include in the results. The column
95 order in the results will match the order of the parameters.
96 connectioninfoitem can take any value from the list that follows:
97
98 auth_mechanism
99 SASL authentication mechanism used, such as "PLAIN".
100
101 client_properties
102 Informational properties transmitted by the client during
103 connection establishment.
104
105 conn_name
106 Readable name for the connection.
107
108 connected_at
109 Date and time this connection was established, as time‐
110 stamp.
111
112 connection_state
113 Connection state; one of:
114 • running
115 • blocked
116
117 frame_max
118 Maximum frame size (bytes).
119
120 heartbeat
121 Negotiated heartbeat interval, in seconds.
122
123 host Server hostname obtained via reverse DNS, or its IP ad‐
124 dress if reverse DNS failed or was disabled.
125
126 peer_cert_issuer
127 The issuer of the peer's SSL certificate, in RFC4514
128 form.
129
130 peer_cert_subject
131 The subject of the peer's SSL certificate, in RFC4514
132 form.
133
134 peer_cert_validity
135 The period for which the peer's SSL certificate is valid.
136
137 peer_host
138 Peer hostname obtained via reverse DNS, or its IP address
139 if reverse DNS failed or was not enabled.
140
141 peer_port
142 Peer port.
143
144 port Server port.
145
146 ssl Boolean indicating whether the connection is secured with
147 SSL.
148
149 ssl_cipher
150 SSL cipher algorithm (e.g. "aes_256_cbc").
151
152 ssl_hash
153 SSL hash function (e.g. "sha").
154
155 ssl_key_exchange
156 SSL key exchange algorithm (e.g. "rsa").
157
158 ssl_protocol
159 SSL protocol (e.g. "tlsv1").
160
161 subscriptions
162 Number of subscriptions (consumers) on the connection.
163
164 user Username associated with the connection.
165
166 vhost Virtual host name with non-ASCII characters escaped as in
167 C.
168
169 If no connectioninfoitem are specified then only conn_name is
170 displayed.
171
172 For example, this command displays the connection name and user
173 for each connection:
174
175 rabbitmq-streams list_stream_connections conn_name user
176
177 list_stream_consumers [-p vhost] [consumerinfoitem ...]
178
179 Returns consumers attached to a stream.
180
181 The consumerinfoitem parameter is used to indicate which consumer
182 information items to include in the results. The column order in
183 the results will match the order of the parameters.
184 consumerinfoitem can take any value from the list that follows:
185
186 active Boolean indicating whether the consumer is active or not.
187
188 activity_status
189 Consumer activity status; one of:
190 • up
191 • single_active
192 • waiting
193
194 connection_pid
195 Id of the Erlang process associated with the consumer
196 connection.
197
198 credits
199 Available credits for the consumer.
200
201 messages_consumed
202 Number of messages the consumer consumed.
203
204 offset The offset (location in the stream) the consumer is at.
205
206 offset_lag
207 The difference between the last stored offset and the
208 last dispatched offset for the consumer.
209
210 properties
211 The properties of the consumer subscription.
212
213 stream The stream the consumer is attached to.
214
215 subscription_id
216 The connection-scoped ID of the consumer.
217
218 If no consumerinfoitem are specified then connection_pid, sub‐
219 scription_id, stream, messages_consumed, offset, offset_lag,
220 credits, active, activity_status, and properties are displayed.
221
222 For example, this command displays the connection PID, subscrip‐
223 tion ID and stream for each consumer:
224
225 rabbitmq-streams list_stream_consumers connection_pid
226 subscription_id stream
227
228
229 list_stream_publishers [-p vhost] [publisherinfoitem ...]
230
231 Returns registered publishers.
232
233 The publisherinfoitem parameter is used to indicate which pub‐
234 lisher information items to include in the results. The column
235 order in the results will match the order of the parameters.
236 publisherinfoitem can take any value from the list that follows:
237
238 connection_pid
239 Id of the Erlang process associated with the consumer
240 connection.
241
242 messages_confirmed
243 The number of confirmed messages for the publisher.
244
245 messages_errored
246 The number of errored messages for the publisher.
247
248 messages_published
249 The overall number of messages the publisher published.
250
251 publisher_id
252 The connection-scoped ID of the publisher.
253
254 reference
255 The deduplication reference of the publisher.
256
257 stream The stream the publisher publishes to.
258
259 If no publisherinfoitem are specified then connection_pid, pub‐
260 lisher_id, stream, reference, messages_published, messages_con‐
261 firmed, and messages_errored are displayed.
262
263 For example, this command displays the connection PID, publisher
264 ID and stream for each producer:
265
266 rabbitmq-streams list_stream_publishers connection_pid
267 publisher_id stream
268
269 add_super_stream super-stream [--vhost vhost] [--partitions partitions]
270 [--routing-keys routing-keys] [--max-length-bytes
271 max-length-bytes] [--max-age max-age]
272 [--stream-max-segment-size-bytes stream-max-segment-size-bytes]
273 [--leader-locator leader-locator] [--initial-cluster-size
274 initial-cluster-size]
275
276 super-stream
277 The name of the super stream to create.
278
279 vhost The name of the virtual host to create the super stream
280 into.
281
282 partitions
283 The number of partitions the super stream will have.
284
285 routing-keys
286 Comma-separated list of routing keys.
287
288 max-length-bytes
289 The maximum size of partition streams, example values:
290 20gb, 500mb.
291
292 max-age
293 The maximum age of partition stream segments, using the
294 ISO 8601 duration format, e.g. PT10M30S for 10 minutes 30
295 seconds, P5DT8H for 5 days 8 hours.
296
297 stream-max-segment-size-bytes
298 The maximum size of partition stream segments, example
299 values: 500mb, 1gb.
300
301 leader-locator
302 Leader locator strategy for partition streams. Possible
303 values are:
304 • client-local
305 • balanced
306 The default is balanced
307
308 initial-cluster-size
309 The initial cluster size of partition streams.
310
311 Create a super stream.
312
313 delete_super_stream super-stream [--vhost vhost]
314
315 super-stream
316 The name of the super stream to delete.
317
318 vhost The virtual host of the super stream.
319
320 Delete a super stream.
321
322
323 list_stream_consumer_groups [-p vhost] [groupinfoitem ...]
324
325 Lists groups of stream single active consumers for a vhost.
326
327 The groupinfoitem parameter is used to indicate which group in‐
328 formation items to include in the results. The column order in
329 the results will match the order of the parameters.
330 groupinfoitem can take any value from the list that follows:
331
332 consumers
333 Number of consumers in the group.
334
335 partition_index
336 The stream partition index if the stream is part of a su‐
337 per stream, -1 if it is not.
338
339 reference
340 The group reference (name).
341
342 stream The stream the consumers are attached to.
343
344 If no groupinfoitem are specified then stream, reference, parti‐
345 tion_index, and consumers are displayed.
346
347 For example, this command displays the stream, reference, and
348 number of consumers for each group:
349
350 rabbitmq-streams list_stream_consumer_groups stream
351 reference consumers
352
353
354 list_stream_group_consumers --stream stream --reference reference
355 [--vhost vhost] [consumerinfoitem ...]
356
357 Lists consumers of a stream consumer group in a vhost.
358
359 stream The stream the consumers are attached to.
360
361 reference
362 The group reference (name).
363
364 vhost The virtual host of the stream.
365
366 The consumerinfoitem parameter is used to indicate which consumer infor‐
367 mation items to include in the results. The column order in the results
368 will match the order of the parameters. consumerinfoitem can take any
369 value from the list that follows:
370
371 connection_name
372 Readable name of the consumer connection.
373
374 state Consumer state; one of:
375 • active
376 • inactive
377
378 subscription_id
379 The connection-scoped ID of the consumer.
380
381 If no consumerinfoitem are specified then subscription_id, connec‐
382 tion_name, and state are displayed.
383
384 For example, this command displays the connection name and state for each
385 consumer attached to the stream-1 stream and belonging to the stream-1
386 group:
387
388 rabbitmq-streams list_stream_group_consumers --stream stream-1
389 --reference stream-1 connection_name state
390
392 rabbitmqctl(8), rabbitmq-diagnostics(8), rabbitmq-server(8),
393 rabbitmq-queues(8), rabbitmq-upgrade(8), rabbitmq-service(8),
394 rabbitmq-env.conf(5), rabbitmq-echopid(8)
395
397 The RabbitMQ Team <info@rabbitmq.com>
398
399RabbitMQ Server September 23, 2022 RabbitMQ Server