In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "what are the basic operations of RabbitMQ command line and control console". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what are the basic operations of the RabbitMQ command line and the console.
Catalogue
Preface
1. Command line operation
1.1 Command operations of basic services
1.2 commands for specific components of rabbitmq
1.2.1 Operation on virtual host
1.2.2 queue operation
1.3 Advanced Operation
two。 Introduction of the control console
2.1 introduction to the Overview (overview) interface
2.1.1 Overview-> Totals
2.1.1 Overview-> Node
2.1.3 Overview-> Ports and contexts
2.1.4 Overview-> Export definitions
2.1.5 Overview-> Import definitions
2.2 introduction to Connections (connection) interface
2.3 introduction of Channels (channel) interface
2.4introduction of Exchanges (switch) interface
Introduction to 2.5 Queues (queue) interface
2.6 introduction to the Admin (user Management) interface
Preface
In the previous article, we introduced the construction of RabbitMQ: the installation of RabbitMQ and the comparison of the major mainstream message middleware: this chapter mainly introduces how our previously installed console is used and how to operate through the command line.
1. Command line operations 1.1 Command operations for basic services
Rabbitmqctl stop_app: close the application
Rabbitmqctl start_app: launch the application
Rabbtmqctl status: node statu
Rabbitmqctl add_user username password: adding user
Rabbitmqctl list_users: list all users
Rabbitmqctl delete_user username: deleting a user
Rabbitmqctl clear_permissions-p vhostpath username: clear user permissions
Rabbitmqctl list_user_permissions_username: list user permissions
Rabbitmqctl change_password username newpassword: changing password
Rabbitmqctl set_permissions-p vhostpath username ". *": set user permissions
There are many more user commands involved, so I won't enumerate them here.
1.2 commands for rabbitmq specific components 1.2.1 operate on virtual hosts
Rabbitmqctl add_vhost vhostpath: creating a virtual host
Rabbitmqctl list_vhosts: list all virtual hosts
Rabbitmqctl list_permissions-p vhostpath: lists all permissions on the virtual host
Rabbitmqctl delete_vhost vhostpath: delete virtual host
1.2.2 queue operation
Rabbitmqctl list_queues: view all queue information
Rabbitmqctl-p vhostpath purge_queue bule: clears messages from the queue
1.3 Advanced Operation
Rabbitmqctl reset: remove all data, to use after rabbitmqctl stop_app
Rabbitmqctl join_clust [- ram]: cluster command
Rabbitmqctl clustr_status: view cluster status
Rabbitmqctl change_cluster_node_type disc | ram modifies the storage form of cluster nodes
Rabbitmqctl forget_cluster_node [- offline] forget node (remove node)
Rabbitmqctl rename_cluster_node oldnode1 newnode1 [oldnode2] [newnode2..] (modify node name)
two。 Introduction of the control console
Log in to the RabbitMQ web administration interface: http://localhost:15672/
The default initial user name and password is: guest
Note: the port in the administrative background of RabbitMQ is 15672 and RabbitMQ listens on port 5672 and port 5672 to connect to RabbitMQ!
2.1 introduction to the Overview (overview) interface
You can see from the figure:
The version number of RabbitMQ and Erlang installation: RabbitMQ xxx, Erlang xxx.
The upper right corner can set the page "refresh time" (5 seconds, 10 seconds, 30 seconds, do not refresh several options). Select the "virtual host" to monitor. The name of the node. Logged in user
2.1.1 Overview-> Totals
If there is any news, there will be a corresponding graphical display.
Ready: total number of messages to be consumed
Unacked: total number of messages to be answered
Total: total Ready+Unacked
The rate at which Disk read:queue reads messages from disk
The rate at which Disk write:queue writes messages from disk
Global counts
Total number of tcp connections for Connections:client
Channels: the total number of channels
Exchanges: total number of switches
Queues: total number of queu
Consumers: total number of consumers
2.1.1 Overview-> Node
Properties of Broker
Name:broker name
File descriptors and restrictions opened by File descriptors:broker.
The number and limits of network sockets managed by Socket descriptors:broker. When the restrictions are exhausted, RabbitMQ will stop accepting new network connections.
The number of processes started by Erlang processes:erlang.
Memory: the memory currently occupied by broker.
Disk space: the hard disk currently occupied by broker.
Uptime: how long the current broker is running continuously.
Info: information about the cluster.
Reset stats: restart a single node or the entire cluster.
2.1.3 Overview-> Ports and contexts
Amqp: communication port with application: 5672
Clustering: communication port with cluster: 25672
Web contexts: console port number: 15672
2.1.4 Overview-> Export definitions
The definition consists of users, virtual hosts, permissions, parameters, exchanges, queues, and bindings. They do not include the contents of the queue or the cluster name. Exclusive queues are not exported.
2.1.5 Overview-> Import definitions
The imported definition is merged with the current definition. If an error occurs during the import process, any changes made will not be rolled back.
2.2 introduction to Connections (connection) interface
Properties of the connection
Virtual host: the virtual host to which it belongs
Name: name
User name: user name used
State: current status, running: running; idle: idle
SSL/TLS: whether to connect using ssl
Protocol: protocol used
Channels: the total number of channel created
From client: packets sent per second
To client: packets received per second
Channels currently connects all created channels
2.3 introduction of Channels (channel) interface
Properties of the channel
Channel: name
Node: node name
Virtual host: the virtual host to which it belongs
User name: user name used
Mode: Channel guarantee mode. It can be one of the following, or not: C: confirm. T:transactional (transaction)
State: current status, running: running; idle: idle
Unconfirmed: the total number of messages waiting for confirm
Prefetch: the number of prefetch set
Unacker: the total number of messages waiting for ack
Rate of publish:producter pub messages
Rate of confirm:producter confirm messages
The rate at which deliver/get:consumer gets messages
Rate of ack:consumer ack messages
2.4introduction of Exchanges (switch) interface
Switch attribute
Virtual host: the virtual host to which it belongs
Name: name
Type:exchange type
Features: function. It can be one of the following, or not: d: persistence. T:Internal, the modification feature means that the exchange cannot be used by client to push messages, but only for binding between exchange and exchange, otherwise messages can be pushed or bound.
Message rate in: the rate at which messages enter
Message rate out: the rate of messages going out
Introduction to 2.5 Queues (queue) interface
Properties of the queue
Virtual host: the virtual host to which it belongs.
Name: name.
Features: function. It can be one of the following, or not: d: persistence.
State: current status, running: running; idle: idle.
Ready: the total number of messages to be consumed.
Unacked: the total number of messages to be answered.
Total: total Ready+Unacked.
Incoming: the rate at which messages enter.
Deliver/get: the rate at which messages are obtained.
Ack: the rate at which messages are answered.
2.6 introduction to the Admin (user Management) interface
Operations such as users or virtual hosts can be added in the Admin interface.
At this point, I believe you have a deeper understanding of "what are the basic operations of the RabbitMQ command line and the console?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.