RABBITMQ Common Commands

Source: Internet
Author: User
Tags regular expression rabbitmq
RABBITMQ Common Commands


rabbitmqctl Command

http://www.rabbitmq.com/man/rabbitmqctl.1.man.html#

1). Server startup and shutdown Startup:

Rabbitmq-server–detached

Or

Service Rabbitmq-server Start


Shut down:

Rabbitmqctl stop

Or

Service Rabbitmq-server Stop


PS: If there are multiple instances of a single machine, add –n after rabbitmqctlh to specify the name



2). Plug-in management to open a plugin: rabbitmq-pluginsenable xxx
To close a plugin: rabbitmq-pluginsdisablexxx
PS: Takes effect after restarting the server.


3). Virtual_host Manage new virtual_host:rabbitmqctladd_vhost xxx
Undo Virtual_host:rabbitmqctl Delete_vhost XXX


4). User Management New User: Rabbitmqctl add_user xxxpwd
Delete User: Rabbitmqctl delete_user xxx
Change Password: Rabbimqctlchange_password {username} {NewPassword}
Set User role: Rabbitmqctlset_user_tags {username} {tag ...}
Tag can be administrator,monitoring, management


5). Rights Management permission settings: set_permissions [-pvhostpath] {user} {conf} {write} {read}
Vhostpath
Vhost Path
User
User name
Conf
A regular expression match which configuration resources can be accessed by that user.
Write
A regular expression match which configuration resources can be read by the user.
Read
A regular expression match which configuration resources can be accessed by that user.



6). Get Server status information Server status: Rabbitmqctl status
Queue information: Rabbitmqctl list_queues[-p vhostpath] [Queueinfoitem ...]

Queueinfoitem can be: name,durable,auto_delete,arguments,messages_ready,messages_unacknowledged,messages,consumers, Memory


Exchange information: Rabbitmqctllist_exchanges[-p Vhostpath] [Exchangeinfoitem ...]
Exchangeinfoitem are: name,type,durable,auto_delete,internal,arguments.


Binding information: Rabbitmqctllist_bindings[-p Vhostpath] [Bindinginfoitem ...]
Bindinginfoitem are: source_name,source_kind,destination_name,destination_kind,routing_key,arguments


Connection info: rabbitmqctllist_connections [connectioninfoitem ...]
Connectioninfoitem are: Recv_oct,recv_cnt,send_oct,send_cnt,send_pend and so on.


Channel information: Rabbitmqctl List_channels[channelinfoitem ...]
Channelinfoitem has consumer_count,messages_unacknowledged,messages_uncommitted,acks_uncommitted,messages_. Unconfirmed,prefetch_count,client_flow_blocked


7). Node type modification



Close First

Rabbitmqctl Stop_app

Modify Type

Rabbitmqctl Change_cluster_node_type Disc
Rabbitmqctl Change_cluster_node_type Ram

Last Launch
Rabbitmqctl Start_app




8). Exit the cluster





Rabbitmqctl Start_app



9). Removing nodes



Ps:rabbit@rabbit1 is a node that exists in a cluster


Rabbimq-plugins

Http://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html

system Commands Uninstall

#rpm-qa|grep RABBITMQ

Rabbitmq-server-3.6.1-1.noarch

#rpm-E--nodeps rabbitmq-server-3.6.1-1.noarch

#rpm-qa|grep Erlang

Esl-erlang-18.3-1.x86_64

#rpm-E--nodeps esl-erlang-18.3-1.x86_64

Service

#service rabbitmq-server Start-Backstage mode operation

#service rabbitmq-server stop-stop running

#service rabbitmq-server Status--View status

plug-in installation

Go to the plugin installation directory {rabbitmq-server}/plugins/(you can see the plug-ins that currently exist)

Cd/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.2/plugins

Download the required plugin (plugin download page http://www.rabbitmq.com/community-plugins.html)

such as download plugin Rabbitmq_delayed_message_exchange

wget Https://bintray.com/rabbitmq/community-plugins/download_file?file_path=rabbitmq_delayed_message_exchange-0.0.1.ez

(if the downloaded file name is irregular, rename it manually, such as: Rabbitmq_delayed_message_exchange-0.0.1.ez)

Enable plugins

Rabbitmq-plugins enable Rabbitmq_delayed_message_exchange 7 ). Type modification of node

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.