forked from rabbitmq/rabbitmq-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrabbitmqctl.8.html
2302 lines (2302 loc) · 125 KB
/
rabbitmqctl.8.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<div class="manual-text">
<section class="Sh">
<h2 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h2>
<code class="Nm">rabbitmqctl</code> —
<div class="Nd">tool for managing RabbitMQ nodes</div>
</section>
<section class="Sh">
<h2 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h2>
<table class="Nm">
<tr>
<td><code class="Nm">rabbitmqctl</code></td>
<td>[<code class="Fl">-q</code>] [<code class="Fl">-s</code>]
[<code class="Fl">-l</code>] [<code class="Fl">-n</code>
<var class="Ar">node</var>] [<code class="Fl">-t</code>
<var class="Ar">timeout</var>] <var class="Ar">command</var>
[<var class="Ar">command_options</var>]</td>
</tr>
</table>
</section>
<section class="Sh">
<h2 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h2>
RabbitMQ is an open source multi-protocol messaging broker.
<p class="Pp"><code class="Nm">rabbitmqctl</code> is a command line tool for
managing a RabbitMQ server node. It performs all actions by connecting to
the target RabbitMQ node on a dedicated CLI tool communication port and
authenticating using a shared secret (known as the cookie file).</p>
<p class="Pp">Diagnostic information is displayed if connection failed, the
target node was not running, or <code class="Nm">rabbitmqctl</code> could
not authenticate to the target node successfully. To learn more, see the
<a class="Lk" href="https://www.rabbitmq.com/cli.html">RabbitMQ CLI Tools
guide</a> and
<a class="Lk" href="https://www.rabbitmq.com/networking.html">RabbitMQ
Networking guide</a></p>
</section>
<section class="Sh">
<h2 class="Sh" id="OPTIONS"><a class="permalink" href="#OPTIONS">OPTIONS</a></h2>
<dl class="Bl-tag">
<dt><a class="permalink" href="#n"><code class="Fl" id="n">-n</code></a>
<var class="Ar">node</var></dt>
<dd>Default node is
"<var class="Ar">rabbit@target-hostname</var>", where
<var class="Ar">target-hostname</var> is the local host. On a host named
"myserver.example.com", the node name will usually be
"rabbit@myserver" (unless
<code class="Ev">RABBITMQ_NODENAME</code> has been overridden). The output
of "hostname -s" is usually the correct suffix to use after
the "@" sign. See
<a class="Xr" href="rabbitmq-server.8.html">rabbitmq-server(8)</a> for
details of configuring a RabbitMQ node.</dd>
<dt><a class="permalink" href="#q"><code class="Fl" id="q">-q</code></a>,
<code class="Fl">--quiet</code></dt>
<dd>Quiet output mode is selected. Informational messages are reduced when
quiet mode is in effect.</dd>
<dt><a class="permalink" href="#s"><code class="Fl" id="s">-s</code></a>,
<code class="Fl">--silent</code></dt>
<dd>Silent output mode is selected. Informational messages are reduced and
table headers are suppressed when silent mode is in effect.</dd>
<dt><a class="permalink" href="#-no-table-headers"><code class="Fl" id="-no-table-headers">--no-table-headers</code></a></dt>
<dd>Do not output headers for tabular data.</dd>
<dt><a class="permalink" href="#-dry-run"><code class="Fl" id="-dry-run">--dry-run</code></a></dt>
<dd>Do not run the command. Only print information message.</dd>
<dt><a class="permalink" href="#t"><code class="Fl" id="t">-t</code></a>
<var class="Ar">timeout</var>, <code class="Fl">--timeout</code>
<var class="Ar">timeout</var></dt>
<dd>Operation timeout in seconds. Not all commands support timeouts. Default
is <code class="Cm">infinity</code>.</dd>
<dt><a class="permalink" href="#l"><code class="Fl" id="l">-l</code></a>,
<code class="Fl">--longnames</code></dt>
<dd>Must be specified when the cluster is configured to use long (FQDN) node
names. To learn more, see the
<a class="Lk" href="https://www.rabbitmq.com/clustering.html">RabbitMQ
Clustering guide</a></dd>
<dt><a class="permalink" href="#-erlang-cookie"><code class="Fl" id="-erlang-cookie">--erlang-cookie</code></a>
<var class="Ar">cookie</var></dt>
<dd>Shared secret to use to authenticate to the target node. Prefer using a
local file or the <code class="Ev">RABBITMQ_ERLANG_COOKIE</code>
environment variable instead of specifying this option on the command
line. To learn more, see the
<a class="Lk" href="https://www.rabbitmq.com/cli.html">RabbitMQ CLI Tools
guide</a></dd>
</dl>
</section>
<section class="Sh">
<h2 class="Sh" id="COMMANDS"><a class="permalink" href="#COMMANDS">COMMANDS</a></h2>
<dl class="Bl-tag">
<dt><a class="permalink" href="#help"><code class="Cm" id="help">help</code></a>
[<code class="Fl">-l</code>] [<var class="Ar">command_name</var>]</dt>
<dd>
<p class="Pp">Prints usage for all available commands.</p>
<dl class="Bl-tag">
<dt><a class="permalink" href="#l_2"><code class="Fl" id="l_2">-l</code></a>,
<code class="Fl">--list-commands</code></dt>
<dd>List command usages only, without parameter explanation.</dd>
<dt><var class="Ar">command_name</var></dt>
<dd>Prints usage for the specified command.</dd>
</dl>
</dd>
<dt><a class="permalink" href="#version"><code class="Cm" id="version">version</code></a></dt>
<dd>
<p class="Pp">Displays CLI tools version</p>
</dd>
</dl>
<section class="Ss">
<h3 class="Ss" id="Nodes"><a class="permalink" href="#Nodes">Nodes</a></h3>
<dl class="Bl-tag">
<dt><a class="permalink" href="#await_startup"><code class="Cm" id="await_startup">await_startup</code></a></dt>
<dd>
<p class="Pp">Waits for the RabbitMQ application to start on the target
node</p>
<p class="Pp">For example, to wait for the RabbitMQ application to
start:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
await_startup</code></div>
</dd>
<dt><a class="permalink" href="#reset"><code class="Cm" id="reset">reset</code></a></dt>
<dd>
<p class="Pp">Returns a RabbitMQ node to its virgin state.</p>
<p class="Pp">Removes the node from any cluster it belongs to, removes all
data from the management database, such as configured users and vhosts,
and deletes all persistent messages.</p>
<p class="Pp">For <code class="Cm">reset</code> and
<code class="Cm">force_reset</code> to succeed the RabbitMQ application
must have been stopped, e.g. with <code class="Cm">stop_app</code>.</p>
<p class="Pp">For example, to reset the RabbitMQ node:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl reset</code></div>
</dd>
<dt><a class="permalink" href="#rotate_logs"><code class="Cm" id="rotate_logs">rotate_logs</code></a></dt>
<dd>
<p class="Pp">Instructs the RabbitMQ node to perform internal log
rotation.</p>
<p class="Pp">Log rotation is performed according to lager settings
specified in configuration file.</p>
<p class="Pp">Note that there is no need to call this command in case of
external log rotation (e.g. from logrotate(8)), because lager detects
renames and automatically reopens log files.</p>
<p class="Pp">For example, this command starts internal log rotation
process:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
rotate_logs</code></div>
<p class="Pp">Rotation is performed asynchronously, so there is no guarantee
that it will be completed when this command returns.</p>
</dd>
<dt><a class="permalink" href="#shutdown"><code class="Cm" id="shutdown">shutdown</code></a></dt>
<dd>
<p class="Pp">Shuts down the node, both RabbitMQ and its runtime. The
command is blocking and will return after the runtime process exits. If
RabbitMQ fails to stop, it will return a non-zero exit code. This
command infers the OS PID of the target node and therefore can only be
used to shut down nodes running on the same host (or broadly speaking,
in the same operating system, e.g. in the same VM or container)</p>
<p class="Pp">Unlike the stop command, the shutdown command:</p>
<ul class="Bl-bullet">
<li>does not require a <var class="Ar">pid_file</var> to wait for the
runtime process to exit</li>
<li>returns a non-zero exit code if RabbitMQ node is not running</li>
</ul>
<p class="Pp">For example, this will shut down a locally running RabbitMQ
node with default node name:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl shutdown</code></div>
</dd>
<dt><a class="permalink" href="#start_app"><code class="Cm" id="start_app">start_app</code></a></dt>
<dd>
<p class="Pp">Starts the RabbitMQ application.</p>
<p class="Pp">This command is typically run after performing other
management actions that required the RabbitMQ application to be stopped,
e.g. <code class="Cm">reset</code>.</p>
<p class="Pp">For example, to instruct the RabbitMQ node to start the
RabbitMQ application:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
start_app</code></div>
</dd>
<dt><a class="permalink" href="#stop"><code class="Cm" id="stop">stop</code></a>
[<var class="Ar">pid_file</var>]</dt>
<dd>
<p class="Pp">Stops the Erlang node on which RabbitMQ is running. To restart
the node follow the instructions for "Running the Server"
in the
<a class="Lk" href="https://rabbitmq.com/download.html">installation
guide</a>.</p>
<p class="Pp">If a <var class="Ar">pid_file</var> is specified, also waits
for the process specified there to terminate. See the description of the
<code class="Cm">wait</code> command for details on this file.</p>
<p class="Pp">For example, to instruct the RabbitMQ node to terminate:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl stop</code></div>
</dd>
<dt><a class="permalink" href="#stop_app"><code class="Cm" id="stop_app">stop_app</code></a></dt>
<dd>
<p class="Pp">Stops the RabbitMQ application, leaving the runtime (Erlang
VM) running.</p>
<p class="Pp">This command is typically run prior to performing other
management actions that require the RabbitMQ application to be stopped,
e.g. <code class="Cm">reset</code>.</p>
<p class="Pp">For example, to instruct the RabbitMQ node to stop the
RabbitMQ application:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl stop_app</code></div>
</dd>
<dt><a class="permalink" href="#wait"><code class="Cm" id="wait">wait</code></a>
<var class="Ar">pid_file</var>, <code class="Cm">wait</code>
<code class="Fl">--pid</code> <var class="Ar">pid</var></dt>
<dd>
<p class="Pp">Waits for the RabbitMQ application to start.</p>
<p class="Pp">This command will wait for the RabbitMQ application to start
at the node. It will wait for the pid file to be created if
<var class="Ar">pidfile</var> is specified, then for a process with a
pid specified in the pid file or the <code class="Fl">--pid</code>
argument, and then for the RabbitMQ application to start in that
process. It will fail if the process terminates without starting the
RabbitMQ application.</p>
<p class="Pp">If the specified pidfile is not created or erlang node is not
started within <code class="Fl">--timeout</code> the command will fail.
Default timeout is 10 seconds.</p>
<p class="Pp">A suitable pid file is created by the
<a class="Xr" href="rabbitmq-server.8.html">rabbitmq-server(8)</a>
script. By default this is located in the Mnesia directory. Modify the
<code class="Ev">RABBITMQ_PID_FILE</code> environment variable to change
the location.</p>
<p class="Pp">For example, this command will return when the RabbitMQ node
has started up:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl wait
/var/run/rabbitmq/pid</code></div>
</dd>
</dl>
</section>
<section class="Ss">
<h3 class="Ss" id="Cluster_management"><a class="permalink" href="#Cluster_management">Cluster
management</a></h3>
<dl class="Bl-tag">
<dt><a class="permalink" href="#await_online_nodes"><code class="Cm" id="await_online_nodes">await_online_nodes</code></a>
<var class="Ar">count</var></dt>
<dd>
<p class="Pp">Waits for <var class="Ar">count</var> nodes to join the
cluster</p>
<p class="Pp">For example, to wait for two RabbitMQ nodes to start:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl await_online_nodes
2</code></div>
</dd>
<dt><a class="permalink" href="#change_cluster_node_type"><code class="Cm" id="change_cluster_node_type">change_cluster_node_type</code></a>
<var class="Ar">type</var></dt>
<dd>
<p class="Pp">Changes the type of the cluster node.</p>
<p class="Pp">The <var class="Ar">type</var> must be one of the
following:</p>
<ul class="Bl-bullet Bl-compact">
<li><a class="permalink" href="#disc"><code class="Cm" id="disc">disc</code></a></li>
<li><a class="permalink" href="#ram"><code class="Cm" id="ram">ram</code></a></li>
</ul>
<p class="Pp">The node must be stopped for this operation to succeed, and
when turning a node into a RAM node the node must not be the only disc
node in the cluster.</p>
<p class="Pp">For example, this command will turn a RAM node into a disc
node:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
change_cluster_node_type disc</code></div>
</dd>
<dt><a class="permalink" href="#cluster_status"><code class="Cm" id="cluster_status">cluster_status</code></a></dt>
<dd>
<p class="Pp">Displays all the nodes in the cluster grouped by node type,
together with the currently running nodes.</p>
<p class="Pp">For example, this command displays the nodes in the
cluster:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
cluster_status</code></div>
</dd>
<dt><a class="permalink" href="#force_boot"><code class="Cm" id="force_boot">force_boot</code></a></dt>
<dd>
<p class="Pp">Ensures that the node will start next time, even if it was not
the last to shut down.</p>
<p class="Pp">Normally when you shut down a RabbitMQ cluster altogether, the
first node you restart should be the last one to go down, since it may
have seen things happen that other nodes did not. But sometimes that's
not possible: for instance if the entire cluster loses power then all
nodes may think they were not the last to shut down.</p>
<p class="Pp">In such a case you can invoke
<code class="Cm">force_boot</code> while the node is down. This will
tell the node to unconditionally start next time you ask it to. If any
changes happened to the cluster after this node shut down, they will be
lost.</p>
<p class="Pp">If the last node to go down is permanently lost then you
should use <code class="Cm">forget_cluster_node</code>
<code class="Fl">--offline</code> in preference to this command, as it
will ensure that mirrored queues which were mastered on the lost node
get promoted.</p>
<p class="Pp">For example, this will force the node not to wait for other
nodes next time it is started:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
force_boot</code></div>
</dd>
<dt><a class="permalink" href="#force_reset"><code class="Cm" id="force_reset">force_reset</code></a></dt>
<dd>
<p class="Pp">Forcefully returns a RabbitMQ node to its virgin state.</p>
<p class="Pp">The <code class="Cm">force_reset</code> command differs from
<code class="Cm">reset</code> in that it resets the node
unconditionally, regardless of the current management database state and
cluster configuration. It should only be used as a last resort if the
database or cluster configuration has been corrupted.</p>
<p class="Pp">For <code class="Cm">reset</code> and
<code class="Cm">force_reset</code> to succeed the RabbitMQ application
must have been stopped, e.g. with <code class="Cm">stop_app</code>.</p>
<p class="Pp">For example, to reset the RabbitMQ node:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
force_reset</code></div>
</dd>
<dt><a class="permalink" href="#forget_cluster_node"><code class="Cm" id="forget_cluster_node">forget_cluster_node</code></a>
[<code class="Fl">--offline</code>]</dt>
<dd>
<dl class="Bl-tag">
<dt><a class="permalink" href="#-offline"><code class="Fl" id="-offline">--offline</code></a></dt>
<dd>Enables node removal from an offline node. This is only useful in the
situation where all the nodes are offline and the last node to go down
cannot be brought online, thus preventing the whole cluster from
starting. It should not be used in any other circumstances since it
can lead to inconsistencies.</dd>
</dl>
<p class="Pp">Removes a cluster node remotely. The node that is being
removed must be offline, while the node we are removing from must be
online, except when using the <code class="Fl">--offline</code>
flag.</p>
<p class="Pp">When using the <code class="Fl">--offline</code> flag ,
<code class="Nm">rabbitmqctl</code> will not attempt to connect to a
node as normal; instead it will temporarily become the node in order to
make the change. This is useful if the node cannot be started normally.
In this case the node will become the canonical source for cluster
metadata (e.g. which queues exist), even if it was not before. Therefore
you should use this command on the latest node to shut down if at all
possible.</p>
<p class="Pp">For example, this command will remove the node
"rabbit@stringer" from the node
"hare@mcnulty":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl -n hare@mcnulty
forget_cluster_node rabbit@stringer</code></div>
</dd>
<dt><a class="permalink" href="#join_cluster"><code class="Cm" id="join_cluster">join_cluster</code></a>
<var class="Ar">seed-node</var> [<code class="Fl">--ram</code>]</dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">seed-node</var></dt>
<dd>Existing cluster member (seed node) to cluster with.</dd>
<dt><a class="permalink" href="#-ram"><code class="Fl" id="-ram">--ram</code></a></dt>
<dd>If provided, the node will join the cluster as a RAM node. RAM node
use is discouraged. Use only if you understand why exactly you need to
use them.</dd>
</dl>
<p class="Pp">Instructs the node to become a member of the cluster that the
specified node is in. Before clustering, the node is reset, so be
careful when using this command. For this command to succeed the
RabbitMQ application must have been stopped, e.g. with
<code class="Cm">stop_app</code>.</p>
<p class="Pp">Cluster nodes can be of two types: disc or RAM. Disc nodes
replicate data in RAM and on disc, thus providing redundancy in the
event of node failure and recovery from global events such as power
failure across all nodes. RAM nodes replicate data in RAM only (with the
exception of queue contents, which can reside on disc if the queue is
persistent or too big to fit in memory) and are mainly used for
scalability. RAM nodes are more performant only when managing resources
(e.g. adding/removing queues, exchanges, or bindings). A cluster must
always have at least one disc node, and usually should have more than
one.</p>
<p class="Pp">The node will be a disc node by default. If you wish to create
a RAM node, provide the <code class="Fl">--ram</code> flag.</p>
<p class="Pp">After executing the <code class="Cm">join_cluster</code>
command, whenever the RabbitMQ application is started on the current
node it will attempt to connect to the nodes that were in the cluster
when the node went down.</p>
<p class="Pp">To leave a cluster, <code class="Cm">reset</code> the node.
You can also remove nodes remotely with the
<code class="Cm">forget_cluster_node</code> command.</p>
<p class="Pp">For example, this command instructs the RabbitMQ node to join
the cluster that "hare@elena" is part of, as a ram
node:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl join_cluster
hare@elena --ram</code></div>
<p class="Pp">To learn more, see the
<a class="Lk" href="https://www.rabbitmq.com/clustering.html">RabbitMQ
Clustering guide</a>.</p>
</dd>
<dt><a class="permalink" href="#rename_cluster_node"><code class="Cm" id="rename_cluster_node">rename_cluster_node</code></a>
<var class="Ar">oldnode1</var> <var class="Ar">newnode1</var>
[<var class="Ar">oldnode2</var> <var class="Ar">newnode2 ...</var>]</dt>
<dd>
<p class="Pp">Supports renaming of cluster nodes in the local database.</p>
<p class="Pp">This subcommand causes <code class="Nm">rabbitmqctl</code> to
temporarily become the node in order to make the change. The local
cluster node must therefore be completely stopped; other nodes can be
online or offline.</p>
<p class="Pp">This subcommand takes an even number of arguments, in pairs
representing the old and new names for nodes. You must specify the old
and new names for this node and for any other nodes that are stopped and
being renamed at the same time.</p>
<p class="Pp">It is possible to stop all nodes and rename them all
simultaneously (in which case old and new names for all nodes must be
given to every node) or stop and rename nodes one at a time (in which
case each node only needs to be told how its own name is changing).</p>
<p class="Pp">For example, this command will rename the node
"rabbit@misshelpful" to the node
"rabbit@cordelia"</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl rename_cluster_node
rabbit@misshelpful rabbit@cordelia</code></div>
<p class="Pp">Note that this command only changes the local database. It may
also be necessary to rename the local database directories, and to
configure the new node name. For example:</p>
<p class="Pp"></p>
<ol class="Bl-enum Bl-compact">
<li>Stop the node:
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl stop
rabbit@misshelpful</code></div>
<p class="Pp"></p>
</li>
<li>Rename the node in the local database:
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
rename_cluster_node rabbit@misshelpful rabbit@cordelia</code></div>
<p class="Pp"></p>
</li>
<li>Rename the local database directories (note, you do not need to do
this if you have set the RABBITMQ_MNESIA_DIR environment variable):
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash">
<pre>
mv \
/var/lib/rabbitmq/mnesia/rabbit\@misshelpful \
/var/lib/rabbitmq/mnesia/rabbit\@cordelia
mv \
/var/lib/rabbitmq/mnesia/rabbit\@misshelpful-rename \
/var/lib/rabbitmq/mnesia/rabbit\@cordelia-rename
mv \
/var/lib/rabbitmq/mnesia/rabbit\@misshelpful-plugins-expand \
/var/lib/rabbitmq/mnesia/rabbit\@cordelia-plugins-expand
</pre>
</div>
<p class="Pp"></p>
</li>
<li>If node name is configured e.g. using
<var class="Ar">/etc/rabbitmq/rabbitmq-env.conf</var> it has also be
updated there.
<p class="Pp"></p>
</li>
<li>Start the node when ready</li>
</ol>
</dd>
<dt><a class="permalink" href="#update_cluster_nodes"><code class="Cm" id="update_cluster_nodes">update_cluster_nodes</code></a>
<var class="Ar">clusternode</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">clusternode</var></dt>
<dd>The node to consult for up-to-date information.</dd>
</dl>
<p class="Pp">Instructs an already clustered node to contact
<var class="Ar">clusternode</var> to cluster when booting up. This is
different from <code class="Cm">join_cluster</code> since it does not
join any cluster - it checks that the node is already in a cluster with
<var class="Ar">clusternode</var>.</p>
<p class="Pp">The need for this command is motivated by the fact that
clusters can change while a node is offline. Consider a situation where
node <var class="Va">rabbit@A</var> and <var class="Va">rabbit@B</var>
are clustered. <var class="Va">rabbit@A</var> goes down,
<var class="Va">rabbit@C</var> clusters with
<var class="Va">rabbit@B</var>, and then <var class="Va">rabbit@B</var>
leaves the cluster. When <var class="Va">rabbit@A</var> starts back up,
it'll try to contact <var class="Va">rabbit@B</var>, but this will fail
since <var class="Va">rabbit@B</var> is not in the cluster anymore. The
following command will rename node <var class="Va">rabbit@B</var> to
<var class="Va">rabbit@C</var> on node <var class="Va">rabbitA</var></p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">update_cluster_nodes -n
<var class="Va">rabbit@A</var> <var class="Va">rabbit@B</var>
<var class="Va">rabbit@C</var></code></div>
<p class="Pp">To learn more, see the
<a class="Lk" href="https://www.rabbitmq.com/clustering.html">RabbitMQ
Clustering guide</a></p>
</dd>
</dl>
</section>
<section class="Ss">
<h3 class="Ss" id="Replication"><a class="permalink" href="#Replication">Replication</a></h3>
<dl class="Bl-tag">
<dt><a class="permalink" href="#sync_queue"><code class="Cm" id="sync_queue">sync_queue</code></a>
[<code class="Fl">-p</code> <var class="Ar">vhost</var>]
<var class="Ar">queue</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">queue</var></dt>
<dd>The name of the queue to synchronise.</dd>
</dl>
<p class="Pp">Instructs a mirrored queue with unsynchronised mirrors
(follower replicas) to synchronise them. The queue will block while
synchronisation takes place (all publishers to and consumers using the
queue will block or temporarily see no activity). This command can only
be used with mirrored queues. To learn more, see the
<a class="Lk" href="https://www.rabbitmq.com/ha.html">RabbitMQ Mirroring
guide</a></p>
<p class="Pp">Note that queues with unsynchronised replicas and active
consumers will become synchronised eventually (assuming that consumers
make progress). This command is primarily useful for queues which do not
have active consumers.</p>
</dd>
<dt><a class="permalink" href="#cancel_sync_queue"><code class="Cm" id="cancel_sync_queue">cancel_sync_queue</code></a>
[<code class="Fl">-p</code> <var class="Ar">vhost</var>]
<var class="Ar">queue</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">queue</var></dt>
<dd>The name of the queue to cancel synchronisation for.</dd>
</dl>
<p class="Pp">Instructs a synchronising mirrored queue to stop synchronising
itself.</p>
</dd>
</dl>
</section>
<section class="Ss">
<h3 class="Ss" id="User_Management"><a class="permalink" href="#User_Management">User
Management</a></h3>
Note that all user management commands <code class="Nm">rabbitmqctl</code> only
can manage users in the internal RabbitMQ database. Users from any alternative
authentication backends such as LDAP cannot be inspected or managed with those
commands. <code class="Nm">rabbitmqctl</code>.
<dl class="Bl-tag">
<dt><a class="permalink" href="#add_user"><code class="Cm" id="add_user">add_user</code></a>
<var class="Ar">username</var> <var class="Ar">password</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">username</var></dt>
<dd>The name of the user to create.</dd>
<dt><var class="Ar">password</var></dt>
<dd>The password the created user will use to log in to the broker.</dd>
</dl>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
create a (non-administrative) user named "janeway" with
(initial) password "changeit":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl add_user janeway
changeit</code></div>
</dd>
<dt><a class="permalink" href="#authenticate_user"><code class="Cm" id="authenticate_user">authenticate_user</code></a>
<var class="Ar">username</var> <var class="Ar">password</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">username</var></dt>
<dd>The name of the user.</dd>
<dt><var class="Ar">password</var></dt>
<dd>The password of the user.</dd>
</dl>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
authenticate the user named "janeway" with password
"verifyit":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl authenticate_user
janeway verifyit</code></div>
</dd>
<dt><a class="permalink" href="#change_password"><code class="Cm" id="change_password">change_password</code></a>
<var class="Ar">username</var> <var class="Ar">newpassword</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">username</var></dt>
<dd>The name of the user whose password is to be changed.</dd>
<dt><var class="Ar">newpassword</var></dt>
<dd>The new password for the user.</dd>
</dl>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
change the password for the user named "janeway" to
"newpass":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl change_password
janeway newpass</code></div>
</dd>
<dt><a class="permalink" href="#clear_password"><code class="Cm" id="clear_password">clear_password</code></a>
<var class="Ar">username</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">username</var></dt>
<dd>The name of the user whose password is to be cleared.</dd>
</dl>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
clear the password for the user named "janeway":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl clear_password
janeway</code></div>
<p class="Pp">This user now cannot log in with a password (but may be able
to through e.g. SASL EXTERNAL if configured).</p>
</dd>
<dt><a class="permalink" href="#delete_user"><code class="Cm" id="delete_user">delete_user</code></a>
<var class="Ar">username</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">username</var></dt>
<dd>The name of the user to delete.</dd>
</dl>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
delete the user named "janeway":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl delete_user
janeway</code></div>
</dd>
<dt><a class="permalink" href="#list_users"><code class="Cm" id="list_users">list_users</code></a></dt>
<dd>
<p class="Pp">Lists users. Each result row will contain the user name
followed by a list of the tags set for that user.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
list all users:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
list_users</code></div>
</dd>
<dt><a class="permalink" href="#set_user_tags"><code class="Cm" id="set_user_tags">set_user_tags</code></a>
<var class="Ar">username</var> [<var class="Ar">tag ...</var>]</dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">username</var></dt>
<dd>The name of the user whose tags are to be set.</dd>
<dt><var class="Ar">tag</var></dt>
<dd>Zero, one or more tags to set. Any existing tags will be removed.</dd>
</dl>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
ensure the user named "janeway" is an administrator:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl set_user_tags janeway
administrator</code></div>
<p class="Pp">This has no effect when the user logs in via AMQP, but can be
used to permit the user to manage users, virtual hosts and permissions
when the user logs in via some other means (for example with the
management plugin).</p>
<p class="Pp">This command instructs the RabbitMQ broker to remove any tags
from the user named "janeway":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl set_user_tags
janeway</code></div>
</dd>
</dl>
</section>
<section class="Ss">
<h3 class="Ss" id="Access_control"><a class="permalink" href="#Access_control">Access
control</a></h3>
<dl class="Bl-tag">
<dt><a class="permalink" href="#clear_permissions"><code class="Cm" id="clear_permissions">clear_permissions</code></a>
[<code class="Fl">-p</code> <var class="Ar">vhost</var>]
<var class="Ar">username</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">vhost</var></dt>
<dd>The name of the virtual host to which to deny the user access,
defaulting to "/".</dd>
<dt><var class="Ar">username</var></dt>
<dd>The name of the user to deny access to the specified virtual
host.</dd>
</dl>
<p class="Pp">Sets user permissions.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
deny the user named "janeway" access to the virtual host
called "my-vhost":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl clear_permissions -p
my-vhost janeway</code></div>
</dd>
<dt><a class="permalink" href="#clear_topic_permissions"><code class="Cm" id="clear_topic_permissions">clear_topic_permissions</code></a>
[<code class="Fl">-p</code> <var class="Ar">vhost</var>]
<var class="Ar">username</var> [<var class="Ar">exchange</var>]</dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">vhost</var></dt>
<dd>The name of the virtual host to which to clear the topic permissions,
defaulting to "/".</dd>
<dt><var class="Ar">username</var></dt>
<dd>The name of the user to clear topic permissions to the specified
virtual host.</dd>
<dt><var class="Ar">exchange</var></dt>
<dd>The name of the topic exchange to clear topic permissions, defaulting
to all the topic exchanges the given user has topic permissions
for.</dd>
</dl>
<p class="Pp">Clear user topic permissions.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
remove topic permissions for user named "janeway" for the
topic exchange "amq.topic" in the virtual host called
"my-vhost":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
clear_topic_permissions -p my-vhost janeway amq.topic</code></div>
</dd>
<dt><a class="permalink" href="#list_permissions"><code class="Cm" id="list_permissions">list_permissions</code></a>
[<code class="Fl">-p</code> <var class="Ar">vhost</var>]</dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">vhost</var></dt>
<dd>The name of the virtual host for which to list the users that have
been granted access to it, and their permissions. Defaults to
"/".</dd>
</dl>
<p class="Pp">Lists permissions in a virtual host.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
list all the users which have been granted access to the virtual host
called "my-vhost", and the permissions they have for
operations on resources in that virtual host. Note that an empty string
means no permissions granted:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl list_permissions -p
my-vhost</code></div>
</dd>
<dt><a class="permalink" href="#list_topic_permissions"><code class="Cm" id="list_topic_permissions">list_topic_permissions</code></a>
[<code class="Fl">-p</code> <var class="Ar">vhost</var>]</dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">vhost</var></dt>
<dd>The name of the virtual host for which to list the users topic
permissions. Defaults to "/".</dd>
</dl>
<p class="Pp">Lists topic permissions in a virtual host.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
list all the users which have been granted topic permissions in the
virtual host called "my-vhost:"</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
list_topic_permissions -p my-vhost</code></div>
</dd>
<dt><a class="permalink" href="#list_user_permissions"><code class="Cm" id="list_user_permissions">list_user_permissions</code></a>
<var class="Ar">username</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">username</var></dt>
<dd>The name of the user for which to list the permissions.</dd>
</dl>
<p class="Pp">Lists user permissions.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
list all the virtual hosts to which the user named
"janeway" has been granted access, and the permissions the
user has for operations on resources in these virtual hosts:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl list_user_permissions
janeway</code></div>
</dd>
<dt><a class="permalink" href="#list_user_topic_permissions"><code class="Cm" id="list_user_topic_permissions">list_user_topic_permissions</code></a>
<var class="Ar">username</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">username</var></dt>
<dd>The name of the user for which to list the topic permissions.</dd>
</dl>
<p class="Pp">Lists user topic permissions.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
list all the virtual hosts to which the user named
"janeway" has been granted access, and the topic
permissions the user has in these virtual hosts:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
list_topic_user_permissions janeway</code></div>
</dd>
<dt><a class="permalink" href="#list_vhosts"><code class="Cm" id="list_vhosts">list_vhosts</code></a>
[<var class="Ar">vhostinfoitem ...</var>]</dt>
<dd>
<p class="Pp">Lists virtual hosts.</p>
<p class="Pp">The <var class="Ar">vhostinfoitem</var> parameter is used to
indicate which virtual host information items to include in the results.
The column order in the results will match the order of the parameters.
<var class="Ar">vhostinfoitem</var> can take any value from the list
that follows:</p>
<dl class="Bl-tag">
<dt><a class="permalink" href="#name"><code class="Cm" id="name">name</code></a></dt>
<dd>The name of the virtual host with non-ASCII characters escaped as in
C.</dd>
<dt><a class="permalink" href="#tracing"><code class="Cm" id="tracing">tracing</code></a></dt>
<dd>Whether tracing is enabled for this virtual host.</dd>
</dl>
<p class="Pp">If no <var class="Ar">vhostinfoitem</var> are specified then
the vhost name is displayed.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
list all virtual hosts:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl list_vhosts name
tracing</code></div>
</dd>
<dt><a class="permalink" href="#set_permissions"><code class="Cm" id="set_permissions">set_permissions</code></a>
[<code class="Fl">-p</code> <var class="Ar">vhost</var>]
<var class="Ar">user</var> <var class="Ar">conf</var>
<var class="Ar">write</var> <var class="Ar">read</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">vhost</var></dt>
<dd>The name of the virtual host to which to grant the user access,
defaulting to "/".</dd>
<dt><var class="Ar">user</var></dt>
<dd>The name of the user to grant access to the specified virtual
host.</dd>
<dt><var class="Ar">conf</var></dt>
<dd>A regular expression matching resource names for which the user is
granted configure permissions.</dd>
<dt><var class="Ar">write</var></dt>
<dd>A regular expression matching resource names for which the user is
granted write permissions.</dd>
<dt><var class="Ar">read</var></dt>
<dd>A regular expression matching resource names for which the user is
granted read permissions.</dd>
</dl>
<p class="Pp">Sets user permissions.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
grant the user named "janeway" access to the virtual host
called "my-vhost", with configure permissions on all
resources whose names starts with "janeway-", and write
and read permissions on all resources:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl set_permissions -p
my-vhost janeway "^janeway-.*" ".*"
".*"</code></div>
</dd>
<dt><a class="permalink" href="#set_topic_permissions"><code class="Cm" id="set_topic_permissions">set_topic_permissions</code></a>
[<code class="Fl">-p</code> <var class="Ar">vhost</var>]
<var class="Ar">user</var> <var class="Ar">exchange</var>
<var class="Ar">write</var> <var class="Ar">read</var></dt>
<dd>
<dl class="Bl-tag">
<dt><var class="Ar">vhost</var></dt>
<dd>The name of the virtual host to which to grant the user access,
defaulting to "/".</dd>
<dt><var class="Ar">user</var></dt>
<dd>The name of the user the permissions apply to in the target virtual
host.</dd>
<dt><var class="Ar">exchange</var></dt>
<dd>The name of the topic exchange the authorisation check will be applied
to.</dd>
<dt><var class="Ar">write</var></dt>
<dd>A regular expression matching the routing key of the published
message.</dd>
<dt><var class="Ar">read</var></dt>
<dd>A regular expression matching the routing key of the consumed
message.</dd>
</dl>
<p class="Pp">Sets user topic permissions.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to let
the user named "janeway" publish and consume messages
going through the "amp.topic" exchange of the
"my-vhost" virtual host with a routing key starting with
"janeway-":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl set_topic_permissions
-p my-vhost janeway amq.topic "^janeway-.*"
"^janeway-.*"</code></div>
<p class="Pp">Topic permissions support variable expansion for the following
variables: username, vhost, and client_id. Note that client_id is
expanded only when using MQTT. The previous example could be made more
generic by using "^{username}-.*":</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl set_topic_permissions
-p my-vhost janeway amq.topic "^{username}-.*"
"^{username}-.*"</code></div>
</dd>
</dl>
</section>
<section class="Ss">
<h3 class="Ss" id="Monitoring,_observability_and_health_checks"><a class="permalink" href="#Monitoring,_observability_and_health_checks">Monitoring,
observability and health checks</a></h3>
<dl class="Bl-tag">
<dt><a class="permalink" href="#environment"><code class="Cm" id="environment">environment</code></a></dt>
<dd>
<p class="Pp">Displays the name and value of each variable in the
application environment for each running application.</p>
</dd>
<dt><a class="permalink" href="#list_bindings"><code class="Cm" id="list_bindings">list_bindings</code></a>
[<code class="Fl">-p</code> <var class="Ar">vhost</var>]
[<var class="Ar">bindinginfoitem ...</var>]</dt>
<dd>
<p class="Pp">Returns binding details. By default the bindings for the
"/" virtual host are returned. The
<code class="Fl">-p</code> flag can be used to override this
default.</p>
<p class="Pp">The <var class="Ar">bindinginfoitem</var> parameter is used to
indicate which binding information items to include in the results. The
column order in the results will match the order of the parameters.
<var class="Ar">bindinginfoitem</var> can take any value from the list
that follows:</p>
<dl class="Bl-tag">
<dt><a class="permalink" href="#source_name"><code class="Cm" id="source_name">source_name</code></a></dt>
<dd>The name of the source of messages to which the binding is attached.
With non-ASCII characters escaped as in C.</dd>
<dt><a class="permalink" href="#source_kind"><code class="Cm" id="source_kind">source_kind</code></a></dt>
<dd>The kind of the source of messages to which the binding is attached.
Currently always exchange. With non-ASCII characters escaped as in
C.</dd>
<dt><a class="permalink" href="#destination_name"><code class="Cm" id="destination_name">destination_name</code></a></dt>
<dd>The name of the destination of messages to which the binding is
attached. With non-ASCII characters escaped as in C.</dd>
<dt><a class="permalink" href="#destination_kind"><code class="Cm" id="destination_kind">destination_kind</code></a></dt>
<dd>The kind of the destination of messages to which the binding is
attached. With non-ASCII characters escaped as in C.</dd>
<dt><a class="permalink" href="#routing_key"><code class="Cm" id="routing_key">routing_key</code></a></dt>
<dd>The binding's routing key, with non-ASCII characters escaped as in
C.</dd>
<dt><a class="permalink" href="#arguments"><code class="Cm" id="arguments">arguments</code></a></dt>
<dd>The binding's arguments.</dd>
</dl>
<p class="Pp">If no <var class="Ar">bindinginfoitem</var> are specified then
all above items are displayed.</p>
<p class="Pp">For example, this command displays the exchange name and queue
name of the bindings in the virtual host named
"my-vhost"</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl list_bindings -p
my-vhost exchange_name queue_name</code></div>
</dd>
<dt><a class="permalink" href="#list_channels"><code class="Cm" id="list_channels">list_channels</code></a>
[<var class="Ar">channelinfoitem ...</var>]</dt>
<dd>
<p class="Pp">Returns information on all current channels, the logical
containers executing most AMQP commands. This includes channels that are
part of ordinary AMQP connections, and channels created by various
plug-ins and other extensions.</p>
<p class="Pp">The <var class="Ar">channelinfoitem</var> parameter is used to
indicate which channel information items to include in the results. The
column order in the results will match the order of the parameters.
<var class="Ar">channelinfoitem</var> can take any value from the list
that follows:</p>
<dl class="Bl-tag">
<dt><a class="permalink" href="#pid"><code class="Cm" id="pid">pid</code></a></dt>
<dd>Id of the Erlang process associated with the connection.</dd>
<dt><a class="permalink" href="#connection"><code class="Cm" id="connection">connection</code></a></dt>
<dd>Id of the Erlang process associated with the connection to which the
channel belongs.</dd>
<dt><a class="permalink" href="#name_2"><code class="Cm" id="name_2">name</code></a></dt>
<dd>Readable name for the channel.</dd>
<dt><a class="permalink" href="#number"><code class="Cm" id="number">number</code></a></dt>
<dd>The number of the channel, which uniquely identifies it within a
connection.</dd>
<dt><a class="permalink" href="#user"><code class="Cm" id="user">user</code></a></dt>
<dd>Username associated with the channel.</dd>
<dt><a class="permalink" href="#vhost"><code class="Cm" id="vhost">vhost</code></a></dt>
<dd>Virtual host in which the channel operates.</dd>
<dt><a class="permalink" href="#transactional"><code class="Cm" id="transactional">transactional</code></a></dt>
<dd>True if the channel is in transactional mode, false otherwise.</dd>
<dt><a class="permalink" href="#confirm"><code class="Cm" id="confirm">confirm</code></a></dt>
<dd>True if the channel is in confirm mode, false otherwise.</dd>
<dt><a class="permalink" href="#consumer_count"><code class="Cm" id="consumer_count">consumer_count</code></a></dt>
<dd>Number of logical AMQP consumers retrieving messages via the
channel.</dd>
<dt><a class="permalink" href="#messages_unacknowledged"><code class="Cm" id="messages_unacknowledged">messages_unacknowledged</code></a></dt>
<dd>Number of messages delivered via this channel but not yet
acknowledged.</dd>
<dt><a class="permalink" href="#messages_uncommitted"><code class="Cm" id="messages_uncommitted">messages_uncommitted</code></a></dt>
<dd>Number of messages received in an as yet uncommitted transaction.</dd>
<dt><a class="permalink" href="#acks_uncommitted"><code class="Cm" id="acks_uncommitted">acks_uncommitted</code></a></dt>
<dd>Number of acknowledgements received in an as yet uncommitted
transaction.</dd>
<dt><a class="permalink" href="#messages_unconfirmed"><code class="Cm" id="messages_unconfirmed">messages_unconfirmed</code></a></dt>
<dd>Number of published messages not yet confirmed. On channels not in
confirm mode, this remains 0.</dd>
<dt><a class="permalink" href="#prefetch_count"><code class="Cm" id="prefetch_count">prefetch_count</code></a></dt>
<dd>QoS prefetch limit for new consumers, 0 if unlimited.</dd>
<dt><a class="permalink" href="#global_prefetch_count"><code class="Cm" id="global_prefetch_count">global_prefetch_count</code></a></dt>
<dd>QoS prefetch limit for the entire channel, 0 if unlimited.</dd>
</dl>
<p class="Pp">If no <var class="Ar">channelinfoitem</var> are specified then
pid, user, consumer_count, and messages_unacknowledged are assumed.</p>
<p class="Pp">For example, this command displays the connection process and
count of unacknowledged messages for each channel:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl list_channels
connection messages_unacknowledged</code></div>
</dd>
<dt><a class="permalink" href="#list_ciphers"><code class="Cm" id="list_ciphers">list_ciphers</code></a></dt>
<dd>
<p class="Pp">Lists cipher suites supported by encoding commands.</p>
<p class="Pp">For example, this command instructs the RabbitMQ broker to
list all cipher suites supported by encoding commands:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent lang-bash"><code class="Li">rabbitmqctl
list_ciphers</code></div>
</dd>
<dt><a class="permalink" href="#list_connections"><code class="Cm" id="list_connections">list_connections</code></a>
[<var class="Ar">connectioninfoitem ...</var>]</dt>
<dd>
<p class="Pp">Returns TCP/IP connection statistics.</p>
<p class="Pp">The <var class="Ar">connectioninfoitem</var> parameter is used
to indicate which connection information items to include in the
results. The column order in the results will match the order of the
parameters. <var class="Ar">connectioninfoitem</var> can take any value
from the list that follows:</p>
<dl class="Bl-tag">
<dt><a class="permalink" href="#pid_2"><code class="Cm" id="pid_2">pid</code></a></dt>
<dd>Id of the Erlang process associated with the connection.</dd>
<dt><a class="permalink" href="#name_3"><code class="Cm" id="name_3">name</code></a></dt>
<dd>Readable name for the connection.</dd>
<dt><a class="permalink" href="#port"><code class="Cm" id="port">port</code></a></dt>
<dd>Server port.</dd>
<dt><a class="permalink" href="#host"><code class="Cm" id="host">host</code></a></dt>
<dd>Server hostname obtained via reverse DNS, or its IP address if reverse
DNS failed or was disabled.</dd>
<dt><a class="permalink" href="#peer_port"><code class="Cm" id="peer_port">peer_port</code></a></dt>
<dd>Peer port.</dd>