Now that we have installed the web management plug-in, we can check the working status of each message queue and exchange in the browser interface.
The installation steps are as follows:
We find "RabbitMQ Command Prompt (sbin dir)" in the computer start menu, click to open it, and directly enter the sbin directory under our rabbitmq installation directory through the command line
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.4\sbin> Another way is to run cmd with administrator privileges, and then the cd can enter this folder!
Execute the command:
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.4\sbin>rabbitmq-plugins enable rabbitmq_management Enabling plugins on node rabbit@DESKTOP-7IAJK37: rabbitmq_management The following plugins have been configured: rabbitmq_management rabbitmq_management_agent rabbitmq_web_dispatch Applying plugin configuration to rabbit@DESKTOP-7IAJK37... The following plugins have been enabled: rabbitmq_management rabbitmq_management_agent rabbitmq_web_dispatch
set 3 plugins. Offline change; changes will take effect at broker restart. This isWe installed it successfully! But it needs to be restarted!!Be sure to restart it, otherwise the web interface will not be accessible!
Restart command: net stop rabbitmq stops first, net start rabbitmq starts again or
The web management interface is:http://localhost:15672/
The username and password are all guest, the login is successful as shown in the figure below:
Let's take a brief look at some of the concepts involved in RabbitMQ
producer: The message producer
Consumer: Message consumer
virtual host: virtual host, in RabbitMQ, users can only set some permissions at the virtual host level, such as which queues I can access, which requests I can handle, etc.
broker: The message forwarder is the function of our RabbitMQ server, so what rules do messages forward according to? The following concepts need to be used;
exchange: Switch, he deals directly with the producer, a bit similar to the function of the router, mainly for forwarding operations, so which exchange does the producer use for routing? This depends on the routing key, each message has this key, we can also set it ourselves, in fact, it is a string;
queue: Message queue, used to store messages, it receives messages routed by exchange, we can persist the queue content, so does queue receive messages routed by exchange? At this time, the binding key will bind the queue and the exchange, as for the binding method, RabbitMQ provides a variety of ways;
The above are some of the concepts involved in RabbitMQ, and the relationship between these concepts is expressed in a diagram:
|