RabbitMQ Concept and Environment Construction (ii) RabbitMQ broker Management

Source: Internet
Author: User
Tags custom name rabbitmq

Rabbitmqctl [-N node] [-Q] {command} [command Options ...]
1. Stop Server
Rabbitmqctl stop

2. View status
Rabbitmqctl status

Other common items
sudo rabbitmqctl list_queues
sudo rabbitmqctl list_exchanges
sudo rabbitmqctl list_bindings
...
3.UI
Rabbitmq-management Plugin
HTTP-based RABBITMQ server management and monitoring tools
Contains browser-based user interface and command-line tool rabbitmqadmin.

Enable
sudo rabbitmq-plugins enable rabbitmq_management

Access

http://server-name:15672/
Http://server-name:15672/api #HTTP API
HTTP://SERVER-NAME:15672/CLI #rabbitmqadmin

Tips
The default Guest account can only be logged on from localhost, and the user must first be added with the appropriate permissions
Rabbitmq-management plugin default behavior can be changed by configuring Rabbitmq.config

4. User management (Increase and deletion of search)
New user
Rabbitmqctl Add_user Username Password
Delete User
Rabbitmqctl Delete_user Username
Change Password
Rabbitmqctl Change_password Username NewPassword
View the list of users
Rabbitmqctl list_users

5. User Roles
Divided into five categories, other, management, policymaker, monitoring, Administrator,
The respective permissions are as follows:
(None)
No access to the management plugin

Management
Anything the user could do via AMQP plus:
List virtual hosts to which they can log in via AMQP
View all queues, exchanges and bindings in "their" virtual hosts
View and close their own channels and connections
View "Global" statistics covering all their virtual hosts, including activity by other users within them

PolicyMaker
Everything "management" can plus:
View, create and delete policies and parameters for virtual hosts to which they can log in via AMQP

Monitoring
Everything "management" can plus:
List all virtual hosts, including ones they could not log on to via AMQP
View other users ' s connections and channels
View Node-level data such as memory use and clustering
View truly global statistics for all virtual hosts

Administrator
Everything "policymaker" and "monitoring" can plus:
Create and delete virtual hosts
View, create and delete users
View, create and delete permissions
Close other users ' s connections

Set up user roles
Rabbitmqctl set_user_tags User Tag
Tag is a role name administrator,monitoring,policymaker,management or other custom name

You can set up multiple roles for the same user, such as:
Rabbitmqctl set_user_tags TESTMQ Monitoring policymaker Administrator

Reference:
Http://www.rabbitmq.com/management.html

6. User Rights
Refers to the user's operation rights to Exchange,queue, including configuration permissions, read and Write permissions.
Configuring permissions affects the Declaration and deletion of Exchange,queue.
Read and Write permissions affect the fetching of messages from a queue, sending messages to exchange, and binding (BIND) operations to queue and exchange.

For example:
Binding a queue to an exchange requires the writable permission of the queue and the readable permissions of exchange;
Sending a message to Exchange requires the writable permission of exchange;
Fetching data from a queue needs to have the Read permission of the queue.

Set user Permissions
Rabbitmqctl set_permissions-p vhostpath User CONFP writep readp
View (Specify Hostpath) permission information for all users
Rabbitmqctl list_permissions [-P Vhostpath]
View permission information for a specified user
Rabbitmqctl list_user_permissions User
Clear the user's permissions information
Rabbitmqctl clear_permissions [-P Vhostpath] User

Reference:
Http://www.rabbitmq.com/access-control.html

RabbitMQ Concept and Environment Construction (ii) RabbitMQ broker Management

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.