1RABBITMQCTL(1)                 RabbitMQ Service                 RABBITMQCTL(1)
2
3
4

NAME

6       rabbitmqctl - command line tool for managing a RabbitMQ broker
7

SYNOPSIS

9
10
11                   rabbitmqctl [-n node] [-t timeout] [-q] {command}
12                   [command options...]
13

DESCRIPTION

15       RabbitMQ is an implementation of AMQP, the emerging standard for high
16       performance enterprise messaging. The RabbitMQ server is a robust and
17       scalable implementation of an AMQP broker.
18
19       rabbitmqctl is a command line tool for managing a RabbitMQ broker. It
20       performs all actions by connecting to one of the broker's nodes.
21
22       Diagnostic information is displayed if the broker was not running,
23       could not be reached, or rejected the connection due to mismatching
24       Erlang cookies.
25

OPTIONS

27       [-n node]
28           Default node is "rabbit@server", where server is the local host. On
29           a host named "server.example.com", the node name of the RabbitMQ
30           Erlang node will usually be rabbit@server (unless RABBITMQ_NODENAME
31           has been set to some non-default value at broker startup time). The
32           output of hostname -s is usually the correct suffix to use after
33           the "@" sign. See rabbitmq-server(1) for details of configuring the
34           RabbitMQ broker.
35
36       [-q]
37           Quiet output mode is selected with the "-q" flag. Informational
38           messages are suppressed when quiet mode is in effect.
39
40       [-t timeout]
41           Operation timeout in seconds. Only applicable to "list" commands.
42           Default is "infinity".
43

COMMANDS

45   Application and Cluster Management
46       stop [pid_file]
47           Stops the Erlang node on which RabbitMQ is running. To restart the
48           node follow the instructions for Running the Server in the
49           installation guide[1].
50
51           If a pid_file is specified, also waits for the process specified
52           there to terminate. See the description of the wait command below
53           for details on this file.
54
55           For example:
56
57           rabbitmqctl stop
58
59           This command instructs the RabbitMQ node to terminate.
60
61       shutdown
62           Shuts down the Erlang process on which RabbitMQ is running. The
63           command is blocking and will return after the Erlang process exits.
64           If RabbitMQ fails to stop, it will return a non-zero exit code.
65
66           Unlike the stop command, the shutdown command: * does not require a
67           pid_file to wait for the Erlang process to exit * if RabbitMQ node
68           is not running, it will return a non-zero exit code
69
70           For example:
71
72           rabbitmqctl shutdown
73
74           This command shuts down the Erlang process on which RabbitMQ is
75           running.
76
77       stop_app
78           Stops the RabbitMQ application, leaving the Erlang node running.
79
80           This command is typically run prior to performing other management
81           actions that require the RabbitMQ application to be stopped, e.g.
82           reset.
83
84           For example:
85
86           rabbitmqctl stop_app
87
88           This command instructs the RabbitMQ node to stop the RabbitMQ
89           application.
90
91       start_app
92           Starts the RabbitMQ application.
93
94           This command is typically run after performing other management
95           actions that required the RabbitMQ application to be stopped, e.g.
96           reset.
97
98           For example:
99
100           rabbitmqctl start_app
101
102           This command instructs the RabbitMQ node to start the RabbitMQ
103           application.
104
105       wait {pid_file}
106           Wait for the RabbitMQ application to start.
107
108           This command will wait for the RabbitMQ application to start at the
109           node. It will wait for the pid file to be created, then for a
110           process with a pid specified in the pid file to start, and then for
111           the RabbitMQ application to start in that process. It will fail if
112           the process terminates without starting the RabbitMQ application.
113
114           A suitable pid file is created by the rabbitmq-server script. By
115           default this is located in the Mnesia directory. Modify the
116           RABBITMQ_PID_FILE environment variable to change the location.
117
118           For example:
119
120           rabbitmqctl wait /var/run/rabbitmq/pid
121
122           This command will return when the RabbitMQ node has started up.
123
124       reset
125           Return a RabbitMQ node to its virgin state.
126
127           Removes the node from any cluster it belongs to, removes all data
128           from the management database, such as configured users and vhosts,
129           and deletes all persistent messages.
130
131           For reset and force_reset to succeed the RabbitMQ application must
132           have been stopped, e.g. with stop_app.
133
134           For example:
135
136           rabbitmqctl reset
137
138           This command resets the RabbitMQ node.
139
140       force_reset
141           Forcefully return a RabbitMQ node to its virgin state.
142
143           The force_reset command differs from reset in that it resets the
144           node unconditionally, regardless of the current management database
145           state and cluster configuration. It should only be used as a last
146           resort if the database or cluster configuration has been corrupted.
147
148           For reset and force_reset to succeed the RabbitMQ application must
149           have been stopped, e.g. with stop_app.
150
151           For example:
152
153           rabbitmqctl force_reset
154
155           This command resets the RabbitMQ node.
156
157       rotate_logs {suffix}
158           Instruct the RabbitMQ node to rotate the log files.
159
160           The RabbitMQ broker appends the contents of its log files to files
161           with names composed of the original name and the suffix, and then
162           resumes logging to freshly created files at the original location.
163           I.e. effectively the current log contents are moved to the end of
164           the suffixed files.
165
166           When the target files do not exist they are created. When no suffix
167           is specified, no rotation takes place - log files are just
168           re-opened.
169
170           For example:
171
172           rabbitmqctl rotate_logs .1
173
174           This command instructs the RabbitMQ node to append the contents of
175           the log files to files with names consisting of the original logs'
176           names and ".1" suffix, e.g. rabbit@mymachine.log.1 and
177           rabbit@mymachine-sasl.log.1. Finally, logging resumes to fresh
178           files at the old locations.
179
180       hipe_compile {directory}
181           Performs HiPE-compilation and caches resulting .beam-files in the
182           given directory.
183
184           Parent directories are created if necessary. Any existing .beam
185           files from the directory are automatically deleted prior to
186           compilation.
187
188           To use this precompiled files, you should set
189           RABBITMQ_SERVER_CODE_PATH environment variable to directory
190           specified in hipe_compile invokation.
191
192           For example:
193
194           rabbitmqctl hipe_compile /tmp/rabbit-hipe/ebin
195
196           HiPE-compiles modules and stores them to /tmp/rabbit-hipe/ebin
197           directory.
198
199   Cluster management
200       join_cluster {clusternode} [--ram]
201
202           clusternode
203               Node to cluster with.
204
205           [--ram]
206               If provided, the node will join the cluster as a RAM node.
207
208           Instruct the node to become a member of the cluster that the
209           specified node is in. Before clustering, the node is reset, so be
210           careful when using this command. For this command to succeed the
211           RabbitMQ application must have been stopped, e.g. with stop_app.
212
213           Cluster nodes can be of two types: disc or RAM. Disc nodes
214           replicate data in RAM and on disc, thus providing redundancy in the
215           event of node failure and recovery from global events such as power
216           failure across all nodes. RAM nodes replicate data in RAM only
217           (with the exception of queue contents, which can reside on disc if
218           the queue is persistent or too big to fit in memory) and are mainly
219           used for scalability. RAM nodes are more performant only when
220           managing resources (e.g. adding/removing queues, exchanges, or
221           bindings). A cluster must always have at least one disc node, and
222           usually should have more than one.
223
224           The node will be a disc node by default. If you wish to create a
225           RAM node, provide the --ram flag.
226
227           After executing the cluster command, whenever the RabbitMQ
228           application is started on the current node it will attempt to
229           connect to the nodes that were in the cluster when the node went
230           down.
231
232           To leave a cluster, reset the node. You can also remove nodes
233           remotely with the forget_cluster_node command.
234
235           For more details see the clustering guide[2].
236
237           For example:
238
239           rabbitmqctl join_cluster hare@elena --ram
240
241           This command instructs the RabbitMQ node to join the cluster that
242           hare@elena is part of, as a ram node.
243
244       cluster_status
245           Displays all the nodes in the cluster grouped by node type,
246           together with the currently running nodes.
247
248           For example:
249
250           rabbitmqctl cluster_status
251
252           This command displays the nodes in the cluster.
253
254       change_cluster_node_type {disc | ram}
255           Changes the type of the cluster node. The node must be stopped for
256           this operation to succeed, and when turning a node into a RAM node
257           the node must not be the only disc node in the cluster.
258
259           For example:
260
261           rabbitmqctl change_cluster_node_type disc
262
263           This command will turn a RAM node into a disc node.
264
265       forget_cluster_node [--offline]
266
267           [--offline]
268               Enables node removal from an offline node. This is only useful
269               in the situation where all the nodes are offline and the last
270               node to go down cannot be brought online, thus preventing the
271               whole cluster from starting. It should not be used in any other
272               circumstances since it can lead to inconsistencies.
273
274           Removes a cluster node remotely. The node that is being removed
275           must be offline, while the node we are removing from must be
276           online, except when using the --offline flag.
277
278           When using the --offline flag rabbitmqctl will not attempt to
279           connect to a node as normal; instead it will temporarily become the
280           node in order to make the change. This is useful if the node cannot
281           be started normally. In this case the node will become the
282           canonical source for cluster metadata (e.g. which queues exist),
283           even if it was not before. Therefore you should use this command on
284           the latest node to shut down if at all possible.
285
286           For example:
287
288           rabbitmqctl -n hare@mcnulty forget_cluster_node rabbit@stringer
289
290           This command will remove the node rabbit@stringer from the node
291           hare@mcnulty.
292
293       rename_cluster_node {oldnode1} {newnode1} [oldnode2] [newnode2 ...]
294           Supports renaming of cluster nodes in the local database.
295
296           This subcommand causes rabbitmqctl to temporarily become the node
297           in order to make the change. The local cluster node must therefore
298           be completely stopped; other nodes can be online or offline.
299
300           This subcommand takes an even number of arguments, in pairs
301           representing the old and new names for nodes. You must specify the
302           old and new names for this node and for any other nodes that are
303           stopped and being renamed at the same time.
304
305           It is possible to stop all nodes and rename them all simultaneously
306           (in which case old and new names for all nodes must be given to
307           every node) or stop and rename nodes one at a time (in which case
308           each node only needs to be told how its own name is changing).
309
310           For example:
311
312           rabbitmqctl rename_cluster_node rabbit@misshelpful rabbit@cordelia
313
314           This command will rename the node rabbit@misshelpful to the node
315           rabbit@cordelia.
316
317       update_cluster_nodes {clusternode}
318
319           clusternode
320               The node to consult for up to date information.
321
322           Instructs an already clustered node to contact clusternode to
323           cluster when waking up. This is different from join_cluster since
324           it does not join any cluster - it checks that the node is already
325           in a cluster with clusternode.
326
327           The need for this command is motivated by the fact that clusters
328           can change while a node is offline. Consider the situation in which
329           node A and B are clustered. A goes down, C clusters with B, and
330           then B leaves the cluster. When A wakes up, it'll try to contact B,
331           but this will fail since B is not in the cluster anymore.
332           update_cluster_nodes -n A C will solve this situation.
333
334       force_boot
335           Ensure that the node will start next time, even if it was not the
336           last to shut down.
337
338           Normally when you shut down a RabbitMQ cluster altogether, the
339           first node you restart should be the last one to go down, since it
340           may have seen things happen that other nodes did not. But sometimes
341           that's not possible: for instance if the entire cluster loses power
342           then all nodes may think they were not the last to shut down.
343
344           In such a case you can invoke rabbitmqctl force_boot while the node
345           is down. This will tell the node to unconditionally start next time
346           you ask it to. If any changes happened to the cluster after this
347           node shut down, they will be lost.
348
349           If the last node to go down is permanently lost then you should use
350           rabbitmqctl forget_cluster_node --offline in preference to this
351           command, as it will ensure that mirrored queues which were mastered
352           on the lost node get promoted.
353
354           For example:
355
356           rabbitmqctl force_boot
357
358           This will force the node not to wait for other nodes next time it
359           is started.
360
361       sync_queue [-p vhost] {queue}
362
363           queue
364               The name of the queue to synchronise.
365
366           Instructs a mirrored queue with unsynchronised slaves to
367           synchronise itself. The queue will block while synchronisation
368           takes place (all publishers to and consumers from the queue will
369           block). The queue must be mirrored for this command to succeed.
370
371           Note that unsynchronised queues from which messages are being
372           drained will become synchronised eventually. This command is
373           primarily useful for queues which are not being drained.
374
375       cancel_sync_queue [-p vhost] {queue}
376
377           queue
378               The name of the queue to cancel synchronisation for.
379
380           Instructs a synchronising mirrored queue to stop synchronising
381           itself.
382
383       purge_queue [-p vhost] {queue}
384
385           queue
386               The name of the queue to purge.
387
388           Purges a queue (removes all messages in it).
389
390       set_cluster_name {name}
391           Sets the cluster name. The cluster name is announced to clients on
392           connection, and used by the federation and shovel plugins to record
393           where a message has been. The cluster name is by default derived
394           from the hostname of the first node in the cluster, but can be
395           changed.
396
397           For example:
398
399           rabbitmqctl set_cluster_name london
400
401           This sets the cluster name to "london".
402
403   User management
404       Note that rabbitmqctl manages the RabbitMQ internal user database.
405       Users from any alternative authentication backend will not be visible
406       to rabbitmqctl.
407
408       add_user {username} {password}
409
410           username
411               The name of the user to create.
412
413           password
414               The password the created user will use to log in to the broker.
415
416           For example:
417
418           rabbitmqctl add_user tonyg changeit
419
420           This command instructs the RabbitMQ broker to create a
421           (non-administrative) user named tonyg with (initial) password
422           changeit.
423
424       delete_user {username}
425
426           username
427               The name of the user to delete.
428
429           For example:
430
431           rabbitmqctl delete_user tonyg
432
433           This command instructs the RabbitMQ broker to delete the user named
434           tonyg.
435
436       change_password {username} {newpassword}
437
438           username
439               The name of the user whose password is to be changed.
440
441           newpassword
442               The new password for the user.
443
444           For example:
445
446           rabbitmqctl change_password tonyg newpass
447
448           This command instructs the RabbitMQ broker to change the password
449           for the user named tonyg to newpass.
450
451       clear_password {username}
452
453           username
454               The name of the user whose password is to be cleared.
455
456           For example:
457
458           rabbitmqctl clear_password tonyg
459
460           This command instructs the RabbitMQ broker to clear the password
461           for the user named tonyg. This user now cannot log in with a
462           password (but may be able to through e.g. SASL EXTERNAL if
463           configured).
464
465       authenticate_user {username} {password}
466
467           username
468               The name of the user.
469
470           password
471               The password of the user.
472
473           For example:
474
475           rabbitmqctl authenticate_user tonyg verifyit
476
477           This command instructs the RabbitMQ broker to authenticate the user
478           named tonyg with password verifyit.
479
480       set_user_tags {username} {tag ...}
481
482           username
483               The name of the user whose tags are to be set.
484
485           tag
486               Zero, one or more tags to set. Any existing tags will be
487               removed.
488
489           For example:
490
491           rabbitmqctl set_user_tags tonyg administrator
492
493           This command instructs the RabbitMQ broker to ensure the user named
494           tonyg is an administrator. This has no effect when the user logs in
495           via AMQP, but can be used to permit the user to manage users,
496           virtual hosts and permissions when the user logs in via some other
497           means (for example with the management plugin).
498
499           rabbitmqctl set_user_tags tonyg
500
501           This command instructs the RabbitMQ broker to remove any tags from
502           the user named tonyg.
503
504       list_users
505           Lists users. Each result row will contain the user name followed by
506           a list of the tags set for that user.
507
508           For example:
509
510           rabbitmqctl list_users
511
512           This command instructs the RabbitMQ broker to list all users.
513
514   Access control
515       Note that rabbitmqctl manages the RabbitMQ internal user database.
516       Permissions for users from any alternative authorisation backend will
517       not be visible to rabbitmqctl.
518
519       add_vhost {vhost}
520
521           vhost
522               The name of the virtual host entry to create.
523
524           Creates a virtual host.
525
526           For example:
527
528           rabbitmqctl add_vhost test
529
530           This command instructs the RabbitMQ broker to create a new virtual
531           host called test.
532
533       delete_vhost {vhost}
534
535           vhost
536               The name of the virtual host entry to delete.
537
538           Deletes a virtual host.
539
540           Deleting a virtual host deletes all its exchanges, queues,
541           bindings, user permissions, parameters and policies.
542
543           For example:
544
545           rabbitmqctl delete_vhost test
546
547           This command instructs the RabbitMQ broker to delete the virtual
548           host called test.
549
550       list_vhosts [vhostinfoitem ...]
551           Lists virtual hosts.
552
553           The vhostinfoitem parameter is used to indicate which virtual host
554           information items to include in the results. The column order in
555           the results will match the order of the parameters.  vhostinfoitem
556           can take any value from the list that follows:
557
558           name
559               The name of the virtual host with non-ASCII characters escaped
560               as in C.
561
562           tracing
563               Whether tracing is enabled for this virtual host.
564
565           If no vhostinfoitems are specified then the vhost name is
566           displayed.
567
568           For example:
569
570           rabbitmqctl list_vhosts name tracing
571
572           This command instructs the RabbitMQ broker to list all virtual
573           hosts.
574
575       set_permissions [-p vhost] {user} {conf} {write} {read}
576
577           vhost
578               The name of the virtual host to which to grant the user access,
579               defaulting to /.
580
581           user
582               The name of the user to grant access to the specified virtual
583               host.
584
585           conf
586               A regular expression matching resource names for which the user
587               is granted configure permissions.
588
589           write
590               A regular expression matching resource names for which the user
591               is granted write permissions.
592
593           read
594               A regular expression matching resource names for which the user
595               is granted read permissions.
596
597           Sets user permissions.
598
599           For example:
600
601           rabbitmqctl set_permissions -p /myvhost tonyg "^tonyg-.*" ".*" ".*"
602
603           This command instructs the RabbitMQ broker to grant the user named
604           tonyg access to the virtual host called /myvhost, with configure
605           permissions on all resources whose names starts with "tonyg-", and
606           write and read permissions on all resources.
607
608       clear_permissions [-p vhost] {username}
609
610           vhost
611               The name of the virtual host to which to deny the user access,
612               defaulting to /.
613
614           username
615               The name of the user to deny access to the specified virtual
616               host.
617
618           Sets user permissions.
619
620           For example:
621
622           rabbitmqctl clear_permissions -p /myvhost tonyg
623
624           This command instructs the RabbitMQ broker to deny the user named
625           tonyg access to the virtual host called /myvhost.
626
627       list_permissions [-p vhost]
628
629           vhost
630               The name of the virtual host for which to list the users that
631               have been granted access to it, and their permissions. Defaults
632               to /.
633
634           Lists permissions in a virtual host.
635
636           For example:
637
638           rabbitmqctl list_permissions -p /myvhost
639
640           This command instructs the RabbitMQ broker to list all the users
641           which have been granted access to the virtual host called /myvhost,
642           and the permissions they have for operations on resources in that
643           virtual host. Note that an empty string means no permissions
644           granted.
645
646       list_user_permissions {username}
647
648           username
649               The name of the user for which to list the permissions.
650
651           Lists user permissions.
652
653           For example:
654
655           rabbitmqctl list_user_permissions tonyg
656
657           This command instructs the RabbitMQ broker to list all the virtual
658           hosts to which the user named tonyg has been granted access, and
659           the permissions the user has for operations on resources in these
660           virtual hosts.
661
662   Parameter Management
663       Certain features of RabbitMQ (such as the federation plugin) are
664       controlled by dynamic, cluster-wide parameters. There are 2 kinds of
665       parameters: parameters scoped to a virtual host and global parameters.
666       Each vhost-scoped parameter consists of a component name, a name and a
667       value. The component name and name are strings, and the value is an
668       Erlang term. A global parameter consists of a name and value. The name
669       is a string and the value is an Erlang term. Parameters can be set,
670       cleared and listed. In general you should refer to the documentation
671       for the feature in question to see how to set parameters.
672
673       set_parameter [-p vhost] {component_name} {name} {value}
674           Sets a parameter.
675
676           component_name
677               The name of the component for which the parameter is being set.
678
679           name
680               The name of the parameter being set.
681
682           value
683               The value for the parameter, as a JSON term. In most shells you
684               are very likely to need to quote this.
685
686           For example:
687
688           rabbitmqctl set_parameter federation local_username '"guest"'
689
690           This command sets the parameter local_username for the federation
691           component in the default virtual host to the JSON term "guest".
692
693       clear_parameter [-p vhost] {component_name} {key}
694           Clears a parameter.
695
696           component_name
697               The name of the component for which the parameter is being
698               cleared.
699
700           name
701               The name of the parameter being cleared.
702
703           For example:
704
705           rabbitmqctl clear_parameter federation local_username
706
707           This command clears the parameter local_username for the federation
708           component in the default virtual host.
709
710       list_parameters [-p vhost]
711           Lists all parameters for a virtual host.
712
713           For example:
714
715           rabbitmqctl list_parameters
716
717           This command lists all parameters in the default virtual host.
718
719       set_global_parameter {name} {value}
720           Sets a global runtime parameter. This is similar to set_parameter
721           but the key-value pair isn't tied to a virtual host.
722
723           name
724               The name of the global runtime parameter being set.
725
726           value
727               The value for the global runtime parameter, as a JSON term. In
728               most shells you are very likely to need to quote this.
729
730           For example:
731
732           rabbitmqctl set_global_parameter mqtt_default_vhosts '{"O=client,CN=guest":"/"}'
733
734           This command sets the global runtime parameter mqtt_default_vhosts
735           to the JSON term {"O=client,CN=guest":"/"}.
736
737       clear_global_parameter {name}
738           Clears a global runtime parameter. This is similar to
739           clear_global_parameter but the key-value pair isn't tied to a
740           virtual host.
741
742           name
743               The name of the global runtime parameter being cleared.
744
745           For example:
746
747           rabbitmqctl clear_global_parameter mqtt_default_vhosts
748
749           This command clears the global runtime parameter
750           mqtt_default_vhosts.
751
752       list_global_parameters
753           Lists all global runtime parameters. This is similar to
754           list_parameters but the global runtime parameters are not tied to
755           any virtual host.
756
757           For example:
758
759           rabbitmqctl list_global_parameters
760
761           This command lists all global parameters.
762
763   Policy Management
764       Policies are used to control and modify the behaviour of queues and
765       exchanges on a cluster-wide basis. Policies apply within a given vhost,
766       and consist of a name, pattern, definition and an optional priority.
767       Policies can be set, cleared and listed.
768
769       set_policy [-p vhost] [--priority priority] [--apply-to apply-to]
770                                                                                                                                                                                                                                                                                                       {name}
771                                                                                                                                                                                                                                                                                                       {pattern}
772                                                                                                                                                                                                                                                                                                       {definition}
773           Sets a policy.
774
775           name
776               The name of the policy.
777
778           pattern
779               The regular expression, which when matches on a given resources
780               causes the policy to apply.
781
782           definition
783               The definition of the policy, as a JSON term. In most shells
784               you are very likely to need to quote this.
785
786           priority
787               The priority of the policy as an integer. Higher numbers
788               indicate greater precedence. The default is 0.
789
790           apply-to
791               Which types of object this policy should apply to - "queues",
792               "exchanges" or "all". The default is "all".
793
794           For example:
795
796           rabbitmqctl set_policy federate-me "^amq." '{"federation-upstream-set":"all"}'
797
798           This command sets the policy federate-me in the default virtual
799           host so that built-in exchanges are federated.
800
801       clear_policy [-p vhost] {name}
802           Clears a policy.
803
804           name
805               The name of the policy being cleared.
806
807           For example:
808
809           rabbitmqctl clear_policy federate-me
810
811           This command clears the federate-me policy in the default virtual
812           host.
813
814       list_policies [-p vhost]
815           Lists all policies for a virtual host.
816
817           For example:
818
819           rabbitmqctl list_policies
820
821           This command lists all policies in the default virtual host.
822
823   Server Status
824       The server status queries interrogate the server and return a list of
825       results with tab-delimited columns. Some queries (list_queues,
826       list_exchanges, list_bindings, and list_consumers) accept an optional
827       vhost parameter. This parameter, if present, must be specified
828       immediately after the query.
829
830       The list_queues, list_exchanges and list_bindings commands accept an
831       optional virtual host parameter for which to display results. The
832       default value is "/".
833
834       list_queues [-p vhost] [[--offline] | [--online] | [--local]]
835                                                                                                                                                                                                                                                                                                                               [queueinfoitem ...]
836           Returns queue details. Queue details of the / virtual host are
837           returned if the "-p" flag is absent. The "-p" flag can be used to
838           override this default.
839
840           Displayed queues can be filtered by their status or location using
841           one of the following mutually exclusive options:
842
843           [--offline]
844               List only those durable queues that are not currently available
845               (more specifically, their master node isn't).
846
847           [--online]
848               List queues that are currently available (their master node
849               is).
850
851           [--local]
852               List only those queues whose master process is located on the
853               current node.
854
855           The queueinfoitem parameter is used to indicate which queue
856           information items to include in the results. The column order in
857           the results will match the order of the parameters.  queueinfoitem
858           can take any value from the list that follows:
859
860           name
861               The name of the queue with non-ASCII characters escaped as in
862               C.
863
864           durable
865               Whether or not the queue survives server restarts.
866
867           auto_delete
868               Whether the queue will be deleted automatically when no longer
869               used.
870
871           arguments
872               Queue arguments.
873
874           policy
875               Policy name applying to the queue.
876
877           pid
878               Id of the Erlang process associated with the queue.
879
880           owner_pid
881               Id of the Erlang process representing the connection which is
882               the exclusive owner of the queue. Empty if the queue is
883               non-exclusive.
884
885           exclusive
886               True if queue is exclusive (i.e. has owner_pid), false
887               otherwise
888
889           exclusive_consumer_pid
890               Id of the Erlang process representing the channel of the
891               exclusive consumer subscribed to this queue. Empty if there is
892               no exclusive consumer.
893
894           exclusive_consumer_tag
895               Consumer tag of the exclusive consumer subscribed to this
896               queue. Empty if there is no exclusive consumer.
897
898           messages_ready
899               Number of messages ready to be delivered to clients.
900
901           messages_unacknowledged
902               Number of messages delivered to clients but not yet
903               acknowledged.
904
905           messages
906               Sum of ready and unacknowledged messages (queue depth).
907
908           messages_ready_ram
909               Number of messages from messages_ready which are resident in
910               ram.
911
912           messages_unacknowledged_ram
913               Number of messages from messages_unacknowledged which are
914               resident in ram.
915
916           messages_ram
917               Total number of messages which are resident in ram.
918
919           messages_persistent
920               Total number of persistent messages in the queue (will always
921               be 0 for transient queues).
922
923           message_bytes
924               Sum of the size of all message bodies in the queue. This does
925               not include the message properties (including headers) or any
926               overhead.
927
928           message_bytes_ready
929               Like message_bytes but counting only those messages ready to be
930               delivered to clients.
931
932           message_bytes_unacknowledged
933               Like message_bytes but counting only those messages delivered
934               to clients but not yet acknowledged.
935
936           message_bytes_ram
937               Like message_bytes but counting only those messages which are
938               in RAM.
939
940           message_bytes_persistent
941               Like message_bytes but counting only those messages which are
942               persistent.
943
944           head_message_timestamp
945               The timestamp property of the first message in the queue, if
946               present. Timestamps of messages only appear when they are in
947               the paged-in state.
948
949           disk_reads
950               Total number of times messages have been read from disk by this
951               queue since it started.
952
953           disk_writes
954               Total number of times messages have been written to disk by
955               this queue since it started.
956
957           consumers
958               Number of consumers.
959
960           consumer_utilisation
961               Fraction of the time (between 0.0 and 1.0) that the queue is
962               able to immediately deliver messages to consumers. This can be
963               less than 1.0 if consumers are limited by network congestion or
964               prefetch count.
965
966           memory
967               Bytes of memory consumed by the Erlang process associated with
968               the queue, including stack, heap and internal structures.
969
970           slave_pids
971               If the queue is mirrored, this gives the IDs of the current
972               slaves.
973
974           synchronised_slave_pids
975               If the queue is mirrored, this gives the IDs of the current
976               slaves which are synchronised with the master - i.e. those
977               which could take over from the master without message loss.
978
979           state
980               The state of the queue. Normally 'running', but may be
981               "{syncing, MsgCount}" if the queue is synchronising. Queues
982               which are located on cluster nodes that are currently down will
983               be shown with a status of 'down' (and most other queueinfoitems
984               will be unavailable).
985
986           If no queueinfoitems are specified then queue name and depth are
987           displayed.
988
989           For example:
990
991           rabbitmqctl list_queues -p /myvhost messages consumers
992
993           This command displays the depth and number of consumers for each
994           queue of the virtual host named /myvhost.
995
996       list_exchanges [-p vhost] [exchangeinfoitem ...]
997           Returns exchange details. Exchange details of the / virtual host
998           are returned if the "-p" flag is absent. The "-p" flag can be used
999           to override this default.
1000
1001           The exchangeinfoitem parameter is used to indicate which exchange
1002           information items to include in the results. The column order in
1003           the results will match the order of the parameters.
1004           exchangeinfoitem can take any value from the list that follows:
1005
1006           name
1007               The name of the exchange with non-ASCII characters escaped as
1008               in C.
1009
1010           type
1011               The exchange type (such as [direct, topic, headers, fanout]).
1012
1013           durable
1014               Whether or not the exchange survives server restarts.
1015
1016           auto_delete
1017               Whether the exchange will be deleted automatically when no
1018               longer used.
1019
1020           internal
1021               Whether the exchange is internal, i.e. cannot be directly
1022               published to by a client.
1023
1024           arguments
1025               Exchange arguments.
1026
1027           policy
1028               Policy name for applying to the exchange.
1029
1030           If no exchangeinfoitems are specified then exchange name and type
1031           are displayed.
1032
1033           For example:
1034
1035           rabbitmqctl list_exchanges -p /myvhost name type
1036
1037           This command displays the name and type for each exchange of the
1038           virtual host named /myvhost.
1039
1040       list_bindings [-p vhost] [bindinginfoitem ...]
1041           Returns binding details. By default the bindings for the / virtual
1042           host are returned. The "-p" flag can be used to override this
1043           default.
1044
1045           The bindinginfoitem parameter is used to indicate which binding
1046           information items to include in the results. The column order in
1047           the results will match the order of the parameters.
1048           bindinginfoitem can take any value from the list that follows:
1049
1050           source_name
1051               The name of the source of messages to which the binding is
1052               attached. With non-ASCII characters escaped as in C.
1053
1054           source_kind
1055               The kind of the source of messages to which the binding is
1056               attached. Currently always exchange. With non-ASCII characters
1057               escaped as in C.
1058
1059           destination_name
1060               The name of the destination of messages to which the binding is
1061               attached. With non-ASCII characters escaped as in C.
1062
1063           destination_kind
1064               The kind of the destination of messages to which the binding is
1065               attached. With non-ASCII characters escaped as in C.
1066
1067           routing_key
1068               The binding's routing key, with non-ASCII characters escaped as
1069               in C.
1070
1071           arguments
1072               The binding's arguments.
1073
1074           If no bindinginfoitems are specified then all above items are
1075           displayed.
1076
1077           For example:
1078
1079           rabbitmqctl list_bindings -p /myvhost exchange_name queue_name
1080
1081           This command displays the exchange name and queue name of the
1082           bindings in the virtual host named /myvhost.
1083
1084       list_connections [connectioninfoitem ...]
1085           Returns TCP/IP connection statistics.
1086
1087           The connectioninfoitem parameter is used to indicate which
1088           connection information items to include in the results. The column
1089           order in the results will match the order of the parameters.
1090           connectioninfoitem can take any value from the list that follows:
1091
1092           pid
1093               Id of the Erlang process associated with the connection.
1094
1095           name
1096               Readable name for the connection.
1097
1098           port
1099               Server port.
1100
1101           host
1102               Server hostname obtained via reverse DNS, or its IP address if
1103               reverse DNS failed or was not enabled.
1104
1105           peer_port
1106               Peer port.
1107
1108           peer_host
1109               Peer hostname obtained via reverse DNS, or its IP address if
1110               reverse DNS failed or was not enabled.
1111
1112           ssl
1113               Boolean indicating whether the connection is secured with SSL.
1114
1115           ssl_protocol
1116               SSL protocol (e.g. tlsv1)
1117
1118           ssl_key_exchange
1119               SSL key exchange algorithm (e.g. rsa)
1120
1121           ssl_cipher
1122               SSL cipher algorithm (e.g. aes_256_cbc)
1123
1124           ssl_hash
1125               SSL hash function (e.g. sha)
1126
1127           peer_cert_subject
1128               The subject of the peer's SSL certificate, in RFC4514 form.
1129
1130           peer_cert_issuer
1131               The issuer of the peer's SSL certificate, in RFC4514 form.
1132
1133           peer_cert_validity
1134               The period for which the peer's SSL certificate is valid.
1135
1136           state
1137               Connection state (one of [starting, tuning, opening, running,
1138               flow, blocking, blocked, closing, closed]).
1139
1140           channels
1141               Number of channels using the connection.
1142
1143           protocol
1144               Version of the AMQP protocol in use (currently one of {0,9,1}
1145               or {0,8,0}). Note that if a client requests an AMQP 0-9
1146               connection, we treat it as AMQP 0-9-1.
1147
1148           auth_mechanism
1149               SASL authentication mechanism used, such as PLAIN.
1150
1151           user
1152               Username associated with the connection.
1153
1154           vhost
1155               Virtual host name with non-ASCII characters escaped as in C.
1156
1157           timeout
1158               Connection timeout / negotiated heartbeat interval, in seconds.
1159
1160           frame_max
1161               Maximum frame size (bytes).
1162
1163           channel_max
1164               Maximum number of channels on this connection.
1165
1166           client_properties
1167               Informational properties transmitted by the client during
1168               connection establishment.
1169
1170           recv_oct
1171               Octets received.
1172
1173           recv_cnt
1174               Packets received.
1175
1176           send_oct
1177               Octets send.
1178
1179           send_cnt
1180               Packets sent.
1181
1182           send_pend
1183               Send queue size.
1184
1185           connected_at
1186               Date and time this connection was established, as timestamp.
1187
1188           If no connectioninfoitems are specified then user, peer host, peer
1189           port, time since flow control and memory block state are displayed.
1190
1191           For example:
1192
1193           rabbitmqctl list_connections send_pend port
1194
1195           This command displays the send queue size and server port for each
1196           connection.
1197
1198       list_channels [channelinfoitem ...]
1199           Returns information on all current channels, the logical containers
1200           executing most AMQP commands. This includes channels that are part
1201           of ordinary AMQP connections, and channels created by various
1202           plug-ins and other extensions.
1203
1204           The channelinfoitem parameter is used to indicate which channel
1205           information items to include in the results. The column order in
1206           the results will match the order of the parameters.
1207           channelinfoitem can take any value from the list that follows:
1208
1209           pid
1210               Id of the Erlang process associated with the connection.
1211
1212           connection
1213               Id of the Erlang process associated with the connection to
1214               which the channel belongs.
1215
1216           name
1217               Readable name for the channel.
1218
1219           number
1220               The number of the channel, which uniquely identifies it within
1221               a connection.
1222
1223           user
1224               Username associated with the channel.
1225
1226           vhost
1227               Virtual host in which the channel operates.
1228
1229           transactional
1230               True if the channel is in transactional mode, false otherwise.
1231
1232           confirm
1233               True if the channel is in confirm mode, false otherwise.
1234
1235           consumer_count
1236               Number of logical AMQP consumers retrieving messages via the
1237               channel.
1238
1239           messages_unacknowledged
1240               Number of messages delivered via this channel but not yet
1241               acknowledged.
1242
1243           messages_uncommitted
1244               Number of messages received in an as yet uncommitted
1245               transaction.
1246
1247           acks_uncommitted
1248               Number of acknowledgements received in an as yet uncommitted
1249               transaction.
1250
1251           messages_unconfirmed
1252               Number of published messages not yet confirmed. On channels not
1253               in confirm mode, this remains 0.
1254
1255           prefetch_count
1256               QoS prefetch limit for new consumers, 0 if unlimited.
1257
1258           global_prefetch_count
1259               QoS prefetch limit for the entire channel, 0 if unlimited.
1260
1261           If no channelinfoitems are specified then pid, user,
1262           consumer_count, and messages_unacknowledged are assumed.
1263
1264           For example:
1265
1266           rabbitmqctl list_channels connection messages_unacknowledged
1267
1268           This command displays the connection process and count of
1269           unacknowledged messages for each channel.
1270
1271       list_consumers [-p vhost]
1272           List consumers, i.e. subscriptions to a queue's message stream.
1273           Each line printed shows, separated by tab characters, the name of
1274           the queue subscribed to, the id of the channel process via which
1275           the subscription was created and is managed, the consumer tag which
1276           uniquely identifies the subscription within a channel, a boolean
1277           indicating whether acknowledgements are expected for messages
1278           delivered to this consumer, an integer indicating the prefetch
1279           limit (with 0 meaning 'none'), and any arguments for this consumer.
1280
1281       status
1282           Displays broker status information such as the running applications
1283           on the current Erlang node, RabbitMQ and Erlang versions, OS name,
1284           memory and file descriptor statistics. (See the cluster_status
1285           command to find out which nodes are clustered and running.)
1286
1287           For example:
1288
1289           rabbitmqctl status
1290
1291           This command displays information about the RabbitMQ broker.
1292
1293       node_health_check
1294           Health check of the RabbitMQ node. Verifies the rabbit application
1295           is running, list_queues and list_channels return, and alarms are
1296           not set.
1297
1298           For example:
1299
1300           rabbitmqctl node_health_check -n rabbit@stringer
1301
1302           This command performs a health check on the RabbitMQ node.
1303
1304       environment
1305           Display the name and value of each variable in the application
1306           environment for each running application.
1307
1308       report
1309           Generate a server status report containing a concatenation of all
1310           server status information for support purposes. The output should
1311           be redirected to a file when accompanying a support request.
1312
1313           For example:
1314
1315           rabbitmqctl report > server_report.txt
1316
1317           This command creates a server report which may be attached to a
1318           support request email.
1319
1320       eval {expr}
1321           Evaluate an arbitrary Erlang expression.
1322
1323           For example:
1324
1325           rabbitmqctl eval 'node().'
1326
1327           This command returns the name of the node to which rabbitmqctl has
1328           connected.
1329
1330   Miscellaneous
1331       close_connection {connectionpid} {explanation}
1332
1333           connectionpid
1334               Id of the Erlang process associated with the connection to
1335               close.
1336
1337           explanation
1338               Explanation string.
1339
1340           Instruct the broker to close the connection associated with the
1341           Erlang process id connectionpid (see also the list_connections
1342           command), passing the explanation string to the connected client as
1343           part of the AMQP connection shutdown protocol.
1344
1345           For example:
1346
1347           rabbitmqctl close_connection "<rabbit@tanto.4262.0>" "go away"
1348
1349           This command instructs the RabbitMQ broker to close the connection
1350           associated with the Erlang process id <rabbit@tanto.4262.0>,
1351           passing the explanation go away to the connected client.
1352
1353       trace_on [-p vhost]
1354
1355           vhost
1356               The name of the virtual host for which to start tracing.
1357
1358           Starts tracing. Note that the trace state is not persistent; it
1359           will revert to being off if the server is restarted.
1360
1361       trace_off [-p vhost]
1362
1363           vhost
1364               The name of the virtual host for which to stop tracing.
1365
1366           Stops tracing.
1367
1368       set_vm_memory_high_watermark {fraction}
1369
1370           fraction
1371               The new memory threshold fraction at which flow control is
1372               triggered, as a floating point number greater than or equal to
1373               0.
1374
1375       set_vm_memory_high_watermark absolute {memory_limit}
1376
1377           memory_limit
1378               The new memory limit at which flow control is triggered,
1379               expressed in bytes as an integer number greater than or equal
1380               to 0 or as a string with memory units (e.g. 512M or 1G).
1381               Available units are: k, kiB: kibibytes (2^10 bytes) M, MiB:
1382               mebibytes (2^20) G, GiB: gibibytes (2^30) kB: kilobytes (10^3)
1383               MB: megabytes (10^6) GB: gigabytes (10^9)
1384
1385       set_disk_free_limit {disk_limit}
1386
1387           disk_limit
1388               Lower bound limit as an integer in bytes or a string with
1389               memory units (see vm_memory_high_watermark), e.g. 512M or 1G.
1390               Once free disk space reaches the limit, a disk alarm will be
1391               set.
1392
1393       set_disk_free_limit mem_relative {fraction}
1394
1395           fraction
1396               Limit relative to the total amount available RAM as a
1397               non-negative floating point number. Values lower than 1.0 can
1398               be dangerous and should be used carefully.
1399
1400       encode [--decode] [value] [passphrase] [--list-ciphers] [--list-hashes]
1401                                                                                                                                                                                                       [--cipher cipher]
1402                                                                                                                                                                                                       [--hash hash]
1403                                                                                                                                                                                                       [--iterations iterations]
1404
1405           [--decode]
1406               Flag to decrypt the input value.
1407
1408               For example:
1409
1410               rabbitmqctl encode --decode '{encrypted, <<"...">>}' mypassphrase
1411
1412           [value] [passphrase]
1413               Value to encrypt/decrypt and passphrase.
1414
1415               For example:
1416
1417               rabbitmqctl encode '<<"guest">>' mypassphrase
1418
1419               rabbitmqctl encode --decode '{encrypted, <<"...">>}' mypassphrase
1420
1421           [--list-ciphers]
1422               Flag to list the supported ciphers.
1423
1424               For example:
1425
1426               rabbitmqctl encode --list-ciphers
1427
1428           [--list-hashes]
1429               Flag to list the supported hash algorithms.
1430
1431               For example:
1432
1433               rabbitmqctl encode --list-hashes
1434
1435           [--cipher cipher] [--hash hash] [--iterations iterations]
1436               Options to specify the encryption settings. They can be used
1437               independently.
1438
1439               For example:
1440
1441               rabbitmqctl encode --cipher blowfish_cfb64 --hash sha256 --iterations 10000 \
1442                                  '<<"guest">>' mypassphrase
1443
1444       decode [value] [passphrase] [--cipher cipher] [--hash hash]
1445                                                                                                                                                                                                       [--iterations iterations]
1446
1447           [value] [passphrase]
1448               Value to decrypt (as produced by the encode command) and
1449               passphrase.
1450
1451               For example:
1452
1453               rabbitmqctl decode '{encrypted, <<"...">>}' mypassphrase
1454
1455           [--cipher cipher] [--hash hash] [--iterations iterations]
1456               Options to specify the decryption settings. They can be used
1457               independently.
1458
1459               For example:
1460
1461               rabbitmqctl decode --cipher blowfish_cfb64 --hash sha256 --iterations 10000 \
1462               '{encrypted,<<"cU4kaour6KG8n/rC4IZT4MfKsS/th9gdAMWjcY9ygUPIwiW4BJmVyg==">>}' mypassphrase
1463
1464       list_hashes
1465           Lists hash functions supported by encoding commands.
1466
1467           For example:
1468
1469           rabbitmqctl list_hashes
1470
1471           This command instructs the RabbitMQ broker to list all hash
1472           functions supported by encoding commands.
1473
1474       list_ciphers
1475           Lists cipher suites supported by encoding commands.
1476
1477           For example:
1478
1479           rabbitmqctl list_ciphers
1480
1481           This command instructs the RabbitMQ broker to list all cipher
1482           suites supported by encoding commands.
1483

AUTHOR

1485       The RabbitMQ Team <<info@rabbitmq.com>>
1486

NOTES

1488        1. installation guide
1489           http://www.rabbitmq.com/install.html
1490
1491        2. clustering guide
1492           http://www.rabbitmq.com/clustering.html
1493
1494
1495
1496RabbitMQ Server                   07/20/2018                    RABBITMQCTL(1)
Impressum