rabbitmq怎么设置一个账户 can accessjetty virtualhosts hosts

rabbitmqctl下令详解 - 编程当前位置:& &&&rabbitmqctl下令详解rabbitmqctl下令详解&&网友分享于:&&浏览:214次rabbitmqctl命令详解
This is the manual page for rabbitmqctl(1).
See a list of all manual pages.
For more general documentation, please see the administrator's guide.
Description
Application and Cluster Management
Cluster management
Closing individual connections
User management
Access control
Server Status
rabbitmqctl — command line tool for managing a RabbitMQ broker
rabbitmqctl [-n node] [-q] {command} [command options...]
RabbitMQ is an implementation of AMQP, the emerging standard for high performance enterprise messaging. The RabbitMQ server is a robust and scalable implementation of an AMQP broker.
rabbitmqctl is a command line tool for managing a RabbitMQ broker. It performs all actions by connecting to one of the broker's nodes.
Default node is "", where server is the local host. On a host named "", the node name of the RabbitMQ Erlang node will usually be
(unless RABBITMQ_NODENAME has been set to some non-default value at broker startup time). The output of hostname -s is usually the correct suffix to use after the "@" sign. See rabbitmq-server(1) for details of configuring the RabbitMQ broker.
Quiet output mode is selected with the "-q" flag. Informational messages are suppressed when quiet mode is in effect.
Stops the Erlang node on which RabbitMQ is running. To restart the node follow the instructions for Running the Server in theinstallation guide.
For example:
rabbitmqctl stop
This command instructs the RabbitMQ node to terminate.
Stops the RabbitMQ application, leaving the Erlang node running.
This command is typically run prior to performing other management actions that require the RabbitMQ application to be stopped, e.g.reset.
For example:
rabbitmqctl stop_app
This command instructs the RabbitMQ node to stop the RabbitMQ application.
Starts the RabbitMQ application.
This command is typically run after performing other management actions that required the RabbitMQ application to be stopped, e.g.reset.
For example:
rabbitmqctl start_app
This command instructs the RabbitMQ node to start the RabbitMQ application.
Wait for the RabbitMQ application to start.
This command will wait for the RabbitMQ application to start at the node. As long as the Erlang node is up but the RabbitMQ application is down it will wait indefinitely. If the node itself goes down, or takes more than five seconds to come up, it will fail.
For example:
rabbitmqctl wait
This command will return when the RabbitMQ node has started up.
Displays various information about the RabbitMQ broker, such as whether the RabbitMQ application on the current node, its version number, what nodes are part of the broker, which of these are running.
For example:
rabbitmqctl status
This command displays information about the RabbitMQ broker.
Return a RabbitMQ node to its virgin state.
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.
For reset and force_reset to succeed the RabbitMQ application must have been stopped, e.g. with stop_app.
For example:
rabbitmqctl reset
This command resets the RabbitMQ node.
force_reset
Forcefully return a RabbitMQ node to its virgin state.
The force_reset command differs from reset 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.
For reset and force_reset to succeed the RabbitMQ application must have been stopped, e.g. with stop_app.
For example:
rabbitmqctl force_reset
This command resets the RabbitMQ node.
rotate_logs {suffix}
Instruct the RabbitMQ node to rotate the log files.
The RabbitMQ broker will attempt to append the current contents of the log file to the file with name composed of the original name and the suffix. It will create a new file if such a file does not already exist. When no suffix is specified, the empty log file is simply created at t no rotation takes place.
When an error occurs while appending the contents of the old log file, the operation behaves in the same way as if no suffix was specified.
This command might be helpful when you are e.g. writing your own logrotate script and you do not want to restart the RabbitMQ node.
For example:
rabbitmqctl rotate_logs .1
This command instructs the RabbitMQ node to append the current content of the log files to the files with names consisting of the original logs' names and ".1" suffix, e.g. rabbit.log.1. Finally, the old log files are reopened.
cluster {clusternode ...}
clusternode
Subset of the nodes of the cluster to which this node should be connected.
Instruct the node to become member of a cluster with the specified nodes. To cluster with currently offline nodes, use force_cluster.
Cluster nodes can be of two types: disk or ram. Disk nodes replicate data in ram and on disk, 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 and are mainly used for scalability. A cluster must always have at least one disk node.
If the current node is to become a disk node it needs to appear in the cluster node list. Otherwise it becomes a ram node. If the node list is empty or only contains the current node then the node becomes a standalone, i.e. non-clustered, (disk) node.
After executing the cluster command, whenever the RabbitMQ application is started on the current node it will attempt to connect to the specified nodes, thus becoming an active node in the cluster comprising those nodes (and possibly others).
The list of nodes does not have to contain all the cluster' a subset is sufficient. Also, clustering generally succeeds as long as at least one of the specified nodes is active. Hence adjustments to the list are only necessary if the cluster configuration is to be altered radically.
For this command to succeed the RabbitMQ application must have been stopped, e.g. with stop_app. Furthermore, turning a standalone node into a clustered node requires the node be reset first, in order to avoid accidental destruction of data with the cluster command.
For more details see the clustering guide.
For example:
rabbitmqctl cluster
This command instructs the RabbitMQ node to join the cluster with nodes
and . If the node is one of these then it becomes a disk node, otherwise a ram node.
force_cluster {clusternode ...}
clusternode
Subset of the nodes of the cluster to which this node should be connected.
Instruct the node to become member of a cluster with the specified nodes. This will succeed even if the specified nodes are offline. For a more detailed description, see cluster.
Note that this variant of the cluster command just ignores the current status of the specified nodes. Clustering may still fail for a variety of other reasons.
close_connection {connectionpid} {explanation}
connectionpid
Id of the Erlang process associated with the connection to close.
explanation
Explanation string.
Instruct the broker to close the connection associated with the Erlang process id connectionpid (see also the list_connectionscommand), passing the explanation string to the connected client as part of the AMQP connection shutdown protocol.
For example:
rabbitmqctl close_connection "&&" "go away"
This command instructs the RabbitMQ broker to close the connection associated with the Erlang process id &&, passing the explanation go away to the connected client.
Note that rabbitmqctl manages the RabbitMQ internal user database. Users from any alternative authentication backend will not be visible torabbitmqctl.
add_user {username} {password}
The name of the user to create.
The password the created user will use to log in to the broker.
For example:
rabbitmqctl add_user tonyg changeit
This command instructs the RabbitMQ broker to create a (non-administrative) user named tonyg with (initial) password changeit.
delete_user {username}
The name of the user to delete.
For example:
rabbitmqctl delete_user tonyg
This command instructs the RabbitMQ broker to delete the user named tonyg.
change_password {username} {newpassword}
The name of the user whose password is to be changed.
newpassword
The new password for the user.
For example:
rabbitmqctl change_password tonyg newpass
This command instructs the RabbitMQ broker to change the password for the user named tonyg to newpass.
clear_password {username}
The name of the user whose password is to be cleared.
For example:
rabbitmqctl clear_password tonyg
This command instructs the RabbitMQ broker to clear the password for the user named tonyg. This user now cannot log in with a password (but may be able to through e.g. SASL EXTERNAL if configured).
set_admin {username}
The name of the user whose administrative status is to be set.
For example:
rabbitmqctl set_admin tonyg
This command instructs the RabbitMQ broker to ensure the user named tonyg is an administrator. 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).
clear_admin {username}
The name of the user whose administrative status is to be cleared.
For example:
rabbitmqctl clear_admin tonyg
This command instructs the RabbitMQ broker to ensure the user named tonyg is not an administrator.
list_users
Lists users
For example:
rabbitmqctl list_users
This command instructs the RabbitMQ broker to list all users. Each result row will contain the user name and the administrator status of the user, in that order.
Note that rabbitmqctl manages the RabbitMQ internal user database. Permissions for users from any alternative authorisation backend will not be visible to rabbitmqctl.
add_vhost {vhostpath}
The name of the virtual host entry to create.
Creates a virtual host.
For example:
rabbitmqctl add_vhost test
This command instructs the RabbitMQ broker to create a new virtual host called test.
delete_vhost {vhostpath}
The name of the virtual host entry to delete.
Deletes a virtual host.
Deleting a virtual host deletes all its exchanges, queues, user mappings and associated permissions.
For example:
rabbitmqctl delete_vhost test
This command instructs the RabbitMQ broker to delete the virtual host called test.
list_vhosts
Lists virtual hosts.
For example:
rabbitmqctl list_vhosts
This command instructs the RabbitMQ broker to list all virtual hosts.
set_permissions [-p vhostpath] {user} {conf} {write} {read}
The name of the virtual host to which to grant the user access, defaulting to /.
The name of the user to grant access to the specified virtual host.
A regular expression matching resource names for which the user is granted configure permissions.
A regular expression matching resource names for which the user is granted write permissions.
A regular expression matching resource names for which the user is granted read permissions.
Sets user permissions.
For example:
rabbitmqctl set_permissions -p /myvhost tonyg "^tonyg-.*" ".*" ".*"
This command instructs the RabbitMQ broker to grant the user named tonyg access to the virtual host called /myvhost, with configure permissions on all resources whose names starts with "tonyg-", and write and read permissions on all resources.
clear_permissions [-p vhostpath] {username}
The name of the virtual host to which to deny the user access, defaulting to /.
The name of the user to deny access to the specified virtual host.
Sets user permissions.
For example:
rabbitmqctl clear_permissions -p /myvhost tonyg
This command instructs the RabbitMQ broker to deny the user named tonyg access to the virtual host called /myvhost.
list_permissions [-p vhostpath]
The name of the virtual host for which to list the users that have been granted access to it, and their permissions. Defaults to /.
Lists permissions in a virtual host.
For example:
rabbitmqctl list_permissions -p /myvhost
This command instructs the RabbitMQ broker to list all the users which have been granted access to the virtual host called /myvhost, and the permissions they have for operations on resources in that virtual host. Note that an empty string means no permissions granted.
list_user_permissions [-p vhostpath] {username}
The name of the user for which to list the permissions.
Lists user permissions.
For example:
rabbitmqctl list_user_permissions tonyg
This command instructs the RabbitMQ broker to list all the virtual hosts to which the user named tonyg has been granted access, and the permissions the user has for operations on resources in these virtual hosts.
The server status queries interrogate the server and return a list of results with tab-delimited columns. Some queries (list_queues,list_exchanges, list_bindings, and list_consumers) accept an optional vhost parameter. This parameter, if present, must be specified immediately after the query.
The list_queues, list_exchanges and list_bindings commands accept an optional virtual host parameter for which to display results. The default value is "/".
list_queues [-p vhostpath] [queueinfoitem ...]
Returns queue details. Queue details of the / virtual host are returned if the "-p" flag is absent. The "-p" flag can be used to override this default.
The queueinfoitem parameter is used to indicate which queue information items to include in the results. The column order in the results will match the order of the parameters. queueinfoitem can take any value from the list that follows:
The name of the queue with non-ASCII characters escaped as in C.
Whether or not the queue survives server restarts.
auto_delete
Whether the queue will be deleted automatically when no longer used.
Queue arguments.
12345678910
12345678910
12345678910 上一篇:下一篇:文章评论相关解决方案 12345678910 Copyright & &&版权所有&&国之画&&&&&&
&& &&&&&&&&&&&&&&&&&&
鲁ICP备号-4
打开技术之扣,分享程序人生!rabbitmqctl(1) - Linux man page
rabbitmqctl - command line tool for managing a RabbitMQ broker
rabbitmqctl [-n node] [-q] {command} [command options...]
Description
RabbitMQ is an implementation of AMQP, the emerging standard for high performance enterprise messaging. The RabbitMQ server is a robust and scalable
implementation of an AMQP broker.
rabbitmqctl is a command line tool for managing a RabbitMQ broker. It performs all actions by connecting to one of the broker's nodes.
Diagnostic information is displayed if the broker was not running, could not be reached, or rejected the connection due to mismatching Erlang
Default node is "rabbit@server", where server is the local host. On a host named "", the node name of the RabbitMQ Erlang node will
usually be rabbit@server (unless RABBITMQ_NODENAME has been set to some non-default value at broker startup time). The output of hostname -s is usually
the correct suffix to use after the "@" sign. See (1) for details of configuring the RabbitMQ broker.
Quiet output mode is selected with the "-q" flag. Informational messages are suppressed when quiet mode is in effect.
Application and Cluster Management
Stops the Erlang node on which RabbitMQ is running. To restart the node follow the instructions for Running the Server in the installation guide [1] .
Stops the RabbitMQ application, leaving the Erlang node running.
This command is typically run prior to performing other management actions that require the RabbitMQ application to be stopped, e.g.
Starts the RabbitMQ application.
This command is typically run after performing other management actions that required the RabbitMQ application to be stopped, e.g.
wait {pid_file}
Wait for the RabbitMQ application to start.
This command will wait for the RabbitMQ application to start at the node. It will wait for the pid file to be created, then for a
process with a pid specified in the pid file to start, and then for the RabbitMQ application to start in that process. It will fail if the process terminates
without starting the RabbitMQ application.
A suitable pid file is created by the rabbitmq-server script. By default this is located in the Mnesia directory. Modify the
RABBITMQ_PID_FILE environment variable to change the location.
Return a RabbitMQ node to its virgin state.
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.
For reset and force_reset to succeed the RabbitMQ application must have been stopped, e.g. with
force_reset
Forcefully return a RabbitMQ node to its virgin state.
The force_reset command differs from reset 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.
For reset and force_reset to succeed the RabbitMQ application must have been stopped, e.g. with
rotate_logs {suffix}
Instruct the RabbitMQ node to rotate the log files.
The RabbitMQ broker will attempt to append the current contents of the log file to the file with name composed of the original name
and the suffix. It will create a new file if such a file does not already exist. When no suffix is specified, the empty log file is simply created at
t no rotation takes place.
When an error occurs while appending the contents of the old log file, the operation behaves in the same way as if no suffix
was specified.
This command might be helpful when you are e.g. writing your own logrotate script and you do not want to restart the RabbitMQ
Cluster management
cluster {clusternode ...}
clusternode
Subset of the nodes of the cluster to which this node should be connected.
Instruct the node to become member of a cluster with the specified nodes. To cluster with currently offline nodes, use
force_cluster.
Cluster nodes can be of two types: disk or ram. Disk nodes replicate data in ram and on disk, 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 and are mainly used for
scalability. A cluster must always have at least one disk node.
If the current node is to become a disk node it needs to appear in the cluster node list. Otherwise it becomes a ram node. If the node
list is empty or only contains the current node then the node becomes a standalone, i.e. non-clustered, (disk) node.
After executing the cluster command, whenever the RabbitMQ application is started on the current node it will attempt to
connect to the specified nodes, thus becoming an active node in the cluster comprising those nodes (and possibly others).
The list of nodes does not have to contain all the cluster' a subset is sufficient. Also, clustering generally succeeds as
long as at least one of the specified nodes is active. Hence adjustments to the list are only necessary if the cluster configuration is to be altered
radically.
For this command to succeed the RabbitMQ application must have been stopped, e.g. with stop_app. Furthermore, turning a
standalone node into a clustered node requires the node be reset first, in order to avoid accidental destruction of data with the cluster
For more details see the clustering guide [2]
force_cluster {clusternode ...}
clusternode
Subset of the nodes of the cluster to which this node should be connected.
Instruct the node to become member of a cluster with the specified nodes. This will succeed even if the specified nodes are offline.
For a more detailed description, see cluster.
Note that this variant of the cluster command just ignores the current status of the specified nodes. Clustering may still fail for a
variety of other reasons.
cluster_status
Displays all the nodes in the cluster grouped by node type, together with the currently running nodes.
Closing individual connections
close_connection {connectionpid} {explanation}
connectionpid
Id of the Erlang process associated with the connection to close.
explanation
Explanation string.
Instruct the broker to close the connection associated with the Erlang process id connectionpid (see also the
list_connections command), passing the explanation string to the connected client as part of the AMQP connection shutdown
User management
Note that rabbitmqctl manages the RabbitMQ internal user database. Users from any alternative authentication backend will not
be visible to rabbitmqctl.
add_user {username} {password}
The name of the user to create.
The password the created user will use to log in to the broker.
delete_user {username}
The name of the user to delete.
change_password {username} {newpassword}
The name of the user whose password is to be changed.
newpassword
The new password for the user.
clear_password {username}
The name of the user whose password is to be cleared.
set_user_tags {username} {tag ...}
The name of the user whose tags are to be set.
Zero, one or more tags to set. Any existing tags will be removed.
list_users
Lists users. Each result row will contain the user name followed by a list of the tags set for that user.
Access control
Note that rabbitmqctl manages the RabbitMQ internal user database. Permissions for users from any alternative authorisation
backend will not be visible to rabbitmqctl.
add_vhost {vhostpath}
The name of the virtual host entry to create.
Creates a virtual host.
delete_vhost {vhostpath}
The name of the virtual host entry to delete.
Deletes a virtual host.
Deleting a virtual host deletes all its exchanges, queues, user mappings and associated permissions.
list_vhosts [vhostinfoitem ...]
Lists virtual hosts.
The vhostinfoitem 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. vhostinfoitem can take any value from the list that follows:
The name of the virtual host with non-ASCII characters escaped as in C.
Whether tracing is enabled for this virtual host.
If no vhostinfoitems are specified then the vhost name is displayed.
set_permissions [-p vhostpath] {user} {conf} {write} {read}
The name of the virtual host to which to grant the user access, defaulting to /.
The name of the user to grant access to the specified virtual host.
A regular expression matching resource names for which the user is granted configure permissions.
A regular expression matching resource names for which the user is granted write permissions.
A regular expression matching resource names for which the user is granted read permissions.
Sets user permissions.
clear_permissions [-p vhostpath] {username}
The name of the virtual host to which to deny the user access, defaulting to /.
The name of the user to deny access to the specified virtual host.
Sets user permissions.
list_permissions [-p vhostpath]
The name of the virtual host for which to list the users that have been granted access to it, and their permissions. Defaults to
Lists permissions in a virtual host.
list_user_permissions [-p vhostpath] {username}
The name of the user for which to list the permissions.
Lists user permissions.
Server Status
The server status queries interrogate the server and return a list of results with tab-delimited columns. Some queries
(list_queues, list_exchanges, list_bindings, and list_consumers) accept an optional vhost parameter. This parameter, if
present, must be specified immediately after the query.
The list_queues, list_exchanges and list_bindings commands accept an optional virtual host parameter for which to display results. The
default value is "/".
list_queues [-p vhostpath] [queueinfoitem ...]
Returns queue details. Queue details of the / virtual host are returned if the "-p" flag is absent. The "-p" flag can be used
to override this default.
The queueinfoitem parameter is used to indicate which queue information items to include in the results. The column order in
the results will match the order of the parameters. queueinfoitem can take any value from the list that follows:
The name of the queue with non-ASCII characters escaped as in C.
Whether or not the queue survives server restarts.
auto_delete
Whether the queue will be deleted automatically when no longer used.
Queue arguments.
Id of the Erlang process associated with the queue.
Id of the Erlang process representing the connection which is the exclusive owner of the queue. Empty if the queue is
non-exclusive.
exclusive_consumer_pid
Id of the Erlang process representing the channel of the exclusive consumer subscribed to this queue. Empty if there is no exclusive
exclusive_consumer_tag
Consumer tag of the exclusive consumer subscribed to this queue. Empty if there is no exclusive consumer.
messages_ready
Number of messages ready to be delivered to clients.
messages_unacknowledged
Number of messages delivered to clients but not yet acknowledged.
Sum of ready and unacknowledged messages (queue depth).
Number of consumers.
Bytes of memory consumed by the Erlang process associated with the queue, including stack, heap and internal
structures.
slave_pids
If the queue is mirrored, this gives the IDs of the current slaves.
synchronised_slave_pids
If the queue is mirrored, this gives the IDs of the current slaves which are synchronised with the master - i.e. those which could
take over from the master without message loss.
If no queueinfoitems are specified then queue name and depth are displayed.
list_exchanges [-p vhostpath] [exchangeinfoitem ...]
Returns exchange details. Exchange details of the / virtual host are returned if the "-p" flag is absent. The "-p" flag can be
used to override this default.
The exchangeinfoitem parameter is used to indicate which exchange information items to include in the results. The column order
in the results will match the order of the parameters. exchangeinfoitem can take any value from the list that follows:
The name of the exchange with non-ASCII characters escaped as in C.
The exchange type (one of [direct, topic, headers, fanout]).
Whether or not the exchange survives server restarts.
auto_delete
Whether the exchange will be deleted automatically when no longer used.
Whether the exchange is internal, i.e. cannot be directly published to by a client.
Exchange arguments.
If no exchangeinfoitems are specified then exchange name and type are displayed.
list_bindings [-p vhostpath] [bindinginfoitem ...]
Returns binding details. By default the bindings for the / virtual host are returned. The "-p" flag can be used to override
this default.
The bindinginfoitem 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. bindinginfoitem can take any value from the list that follows:
source_name
The name of the source of messages to which the binding is attached. With non-ASCII characters escaped as in C.
source_kind
The kind of the source of messages to which the binding is attached. Currently always queue. With non-ASCII characters escaped as in
destination_name
The name of the destination of messages to which the binding is attached. With non-ASCII characters escaped as in C.
destination_kind
The kind of the destination of messages to which the binding is attached. With non-ASCII characters escaped as in C.
routing_key
The binding's routing key, with non-ASCII characters escaped as in C.
The binding's arguments.
If no bindinginfoitems are specified then all above items are displayed.
list_connections [connectioninfoitem ...]
Returns TCP/IP connection statistics.
The connectioninfoitem 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. connectioninfoitem can take any value from the list that follows:
Id of the Erlang process associated with the connection.
Server IP address.
Server port.
peer_address
Peer address.
Peer port.
Boolean indicating whether the connection is secured with SSL.
ssl_protocol
SSL protocol (e.g. tlsv1)
ssl_key_exchange
SSL key exchange algorithm (e.g. rsa)
ssl_cipher
SSL cipher algorithm (e.g. aes_256_cbc)
SSL hash function (e.g. sha)
peer_cert_subject
The subject of the peer's SSL certificate, in RFC4514 form.
peer_cert_issuer
The issuer of the peer's SSL certificate, in RFC4514 form.
peer_cert_validity
The period for which the peer's SSL certificate is valid.
Connection state (one of [starting, tuning, opening, running, closing,
Number of channels using the connection.
Version of the AMQP protocol in use (currently one of {0,9,1} or {0,8,0}). Note that if a client requests an AMQP 0-9
connection, we treat it as AMQP 0-9-1.
auth_mechanism
SASL authentication mechanism used, such as PLAIN.
Username associated with the connection.
Virtual host name with non-ASCII characters escaped as in C.
Connection timeout.
Maximum frame size (bytes).
client_properties
Informational properties transmitted by the client during connection establishment.
Octets received.
Packets received.
Octets send.
Packets sent.
Send queue size.
If no connectioninfoitems are specified then user, peer address, peer port and connection state are displayed.
list_channels [channelinfoitem ...]
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.
The channelinfoitem 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. channelinfoitem can take any value from the list that follows:
Id of the Erlang process associated with the connection.
connection
Id of the Erlang process associated with the connection to which the channel belongs.
The number of the channel, which uniquely identifies it within a connection.
Username associated with the channel.
Virtual host in which the channel operates.
transactional
True if the channel is in transactional mode, false otherwise.
True if the channel is in confirm mode, false otherwise.
consumer_count
Number of logical AMQP consumers retrieving messages via the channel.
messages_unacknowledged
Number of messages delivered via this channel but not yet acknowledged.
messages_uncommitted
Number of messages received in an as yet uncommitted transaction.
acks_uncommitted
Number of acknowledgements received in an as yet uncommitted transaction.
messages_unconfirmed
Number of published messages not yet confirmed. On channels not in confirm mode, this remains 0.
prefetch_count
QoS prefetch count limit in force, 0 if unlimited.
client_flow_blocked
True if the client issued a channel.flow{active=false} command, blocking the server from delivering messages to the channel's
consumers.
If no channelinfoitems are specified then pid, user, consumer_count, and messages_unacknowledged are assumed.
list_consumers [-p vhostpath]
List consumers, i.e. subscriptions to a queue's message stream. Each line printed shows, separated by tab characters, the name of the
queue subscribed to, the id of the channel process via which the subscription was created and is managed, the consumer tag which uniquely identifies the
subscription within a channel, and a boolean indicating whether acknowledgements are expected for messages delivered to this consumer.
The output is a list of rows containing, in order, the queue name, channel process id, consumer tag, and a boolean indicating whether
acknowledgements are expected from the consumer.
Displays broker status information such as the running applications on the current Erlang node, RabbitMQ and Erlang versions and OS
name. (See the cluster_status command to find out which nodes are clustered and running.)
environment
Display the name and value of each variable in the application environment.
Generate a server status report containing a concatenation of all server status information for support purposes. The output should be
redirected to a file when accompanying a support request.
Message Tracing
trace_on [-p vhost]
The name of the virtual host for which to start tracing.
Starts tracing.
trace_off [-p vhost]
The name of the virtual host for which to stop tracing.
Stops tracing.
rabbitmqctl stop
This command instructs the RabbitMQ node to terminate.
rabbitmqctl stop_app
This command instructs the RabbitMQ node to stop the RabbitMQ application.
rabbitmqctl start_app
This command instructs the RabbitMQ node to start the RabbitMQ application.
rabbitmqctl wait /var/run/rabbitmq/pid
This command will return when the RabbitMQ node has started up.
rabbitmqctl reset
This command resets the RabbitMQ node.
rabbitmqctl force_reset
This command resets the RabbitMQ node.
rabbitmqctl rotate_logs .1
This command instructs the RabbitMQ node to append the current content of the log files to the files with names consisting of the
original logs' names and ".1" suffix, e.g. rabbit.log.1. Finally, the old log files are reopened.
rabbitmqctl cluster rabbit@tanto hare@elena
This command instructs the RabbitMQ node to join the cluster with nodes rabbit@tanto and hare@elena. If the node is one
of these then it becomes a disk node, otherwise a ram node.
rabbitmqctl cluster_status
This command displays the nodes in the cluster.
rabbitmqctl close_connection "&rabbit@tanto.4262.0&" "go away"
This command instructs the RabbitMQ broker to close the connection associated with the Erlang process id
&rabbit@tanto.4262.0&, passing the explanation go away to the connected client.
rabbitmqctl add_user tonyg changeit
This command instructs the RabbitMQ broker to create a (non-administrative) user named tonyg with (initial) password
rabbitmqctl delete_user tonyg
This command instructs the RabbitMQ broker to delete the user named tonyg.
rabbitmqctl change_password tonyg newpass
This command instructs the RabbitMQ broker to change the password for the user named tonyg to newpass.
rabbitmqctl clear_password tonyg
This command instructs the RabbitMQ broker to clear the password for the user named tonyg. This user now cannot log in with a
password (but may be able to through e.g. SASL EXTERNAL if configured).
rabbitmqctl set_user_tags tonyg administrator
This command instructs the RabbitMQ broker to ensure the user named tonyg is an administrator. 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).
This command instructs the RabbitMQ broker to remove any tags from the user named tonyg.
rabbitmqctl set_user_tags tonyg
This command instructs the RabbitMQ broker to remove any tags from the user named tonyg.
rabbitmqctl list_users
This command instructs the RabbitMQ broker to list all users.
rabbitmqctl add_vhost test
This command instructs the RabbitMQ broker to create a new virtual host called test.
rabbitmqctl delete_vhost test
This command instructs the RabbitMQ broker to delete the virtual host called test.
rabbitmqctl list_vhosts name tracing
This command instructs the RabbitMQ broker to list all virtual hosts.
rabbitmqctl set_permissions -p /myvhost tonyg "^tonyg-.*" ".*" ".*"
This command instructs the RabbitMQ broker to grant the user named tonyg access to the virtual host called /myvhost,
with configure permissions on all resources whose names starts with "tonyg-", and write and read permissions on all resources.
rabbitmqctl clear_permissions -p /myvhost tonyg
This command instructs the RabbitMQ broker to deny the user named tonyg access to the virtual host called
rabbitmqctl list_permissions -p /myvhost
This command instructs the RabbitMQ broker to list all the users which have been granted access to the virtual host called
/myvhost, and the permissions they have for operations on resources in that virtual host. Note that an empty string means no permissions
rabbitmqctl list_user_permissions tonyg
This command instructs the RabbitMQ broker to list all the virtual hosts to which the user named tonyg has been granted access,
and the permissions the user has for operations on resources in these virtual hosts.
rabbitmqctl list_queues -p /myvhost messages consumers
This command displays the depth and number of consumers for each queue of the virtual host named /myvhost.
rabbitmqctl list_exchanges -p /myvhost name type
This command displays the name and type for each exchange of the virtual host named /myvhost.
rabbitmqctl list_bindings -p /myvhost exchange_name queue_name
This command displays the exchange name and queue name of the bindings in the virtual host named /myvhost.
rabbitmqctl list_connections send_pend port
This command displays the send queue size and server port for each connection.
rabbitmqctl list_channels connection messages_unacknowledged
This command displays the connection process and count of unacknowledged messages for each channel.
rabbitmqctl status
This command displays information about the RabbitMQ broker.
rabbitmqctl report & server_report.txt
This command creates a server report which may be attached to a support request email.
The RabbitMQ Team &&
<font color="#.
installation guide
<font color="#.
clustering guide
Referenced By
Site Search

我要回帖

更多关于 virtual hosts 设置 的文章

 

随机推荐