RabbitMQ concept and environment construction (2) RabbitMQBroker Management

Source: Internet
Author: User

RabbitMQ concept and environment construction (2) RabbitMQBroker Management
Rabbitmqctl [-n node] [-q] {command} [command options...]
1. Stop the Server
Rabbitmqctl stop

2. view the 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 the browser-based user interface and the 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

Prompt
By default, the guest account can only log on from localhost. You must first add the user to grant the corresponding permissions.
You can change the default behavior of rabbitmq-management plugin by configuring rabbitmq. config.

4. User Management (add, delete, modify, and query)
New User
Rabbitmqctl add_user Username Password
Delete a user
Rabbitmqctl delete_user Username
Change Password
Rabbitmqctl change_password Username Newpassword
View User List
Rabbitmqctl list_users

5. User Role
It can be divided into five categories: others, management, policymaker, monitoring, administrator,
The permissions are as follows:
(None)
No access to the management plugin

Management
Anything the user cocould 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 parameters ies 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 cocould not log in 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 "yymaker" 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 User Roles
Rabbitmqctl set_user_tags User Tag
Tag is the role name administrator, monitoring, policymaker, management, or other custom names.

You can set multiple roles for the same user, for example:
Rabbitmqctl set_user_tags testmq monitoring policymaker administrator

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

6. User Permissions
The user's operation permissions on exchange and queue, including configuration permissions and read/write permissions.
Configuring permissions affects exchange and queue declarations and deletion.
The read/write permission affects Retrieving messages from the queue, sending messages to exchange, and binding (bind) operations between queue and exchange.

For example:
To bind a queue to an exchange instance, you must have the write and exchange read permissions for the queue;
You must have the write permission for exchange to send messages to exchange;
Retrieving data from a queue requires the read permission of the queue.

Set User Permissions
Rabbitmqctl set_permissions-p VHostPath User ConfP WriteP ReadP
View permissions of all users (specify hostpath)
Rabbitmqctl list_permissions [-p VHostPath]
View permissions of a specified user
Rabbitmqctl list_user_permissions User
Clear user permission information
Rabbitmqctl clear_permissions [-p VHostPath] User

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.