The installation of RabbitMqs doesn't need to be said, just say the cocoon.Start with your own experience!
(1): After successful installation, you can see the following login page on your browser, enter http://localhost:15672/, Username:guest Password:guest in the address bar, and log in using the guest account.Remember to turn off the service after you use RabbitMq each day and turn it on the next day when you use it
(2) Mode of management:
There are four ways to manage RabbitMQ: RabbitMQ Management(Web UI) rabbitmqctl command line tool(curl) (not to mention, time for research) rabbitmqadmin (not to mention, time for research)
There can be multiple Erlang nodes (instances) on a physical machine, and each node can run multiple applications, including RabbitMQ, the Manesia database in the Erlang language, and RabbitMQ-related plug-ins (such as RabbitMQ Management).Erlang nodes can be analogized to java's JVM.
(1) rabbitmqctl command mode:
RabbitMQ Management is a management interface for operating RabbitMQ. It can operate many common operations, but it does not support all operations. The command line supports all functions.
Enter the command after cmd in the RabbitMq directory sbin:
Rabbitmqctl command line: the command line is more powerful than the web management interface, the command of the web interface is only a subset of the rabbitmqctl command
Application and Cluster Management, Cluster management, User management, Access Control, Parameter Management, Policy Management, Server Status Miscellaneous
rabbitmqctl command line:
rabbitmq-server // Start both erlang nodes and Applications // View commands supported by rabrabbitmqctl rabrabbitmqctl //View all RabbitMq commands rabbitmqctl list_help // View Status rabbitmqctl status //Stop the erlang node while closing the erlang node and Applications rabbitmqctl stop // Stop the RabbitMQ service and close only the rabbit application on the erlang node rabbitmqctl stop_app // Start RabbitMQ Service rabbitmqctl start_app // Format rabbitmq node (there are certain conditions that need to be met in the cluster to shut down) //First run the rabbitmqctl stop_app service and stop it before reset rabbitmqctl reset // Force formatting of rabbitmq node rabbitmqctl force_reset // Clear all messages from a queue rabbitmqctl purge_queue <name> // Add User rabbitmqctl add_user <username> <password> // Set permissions rabbitmqctl set_permissions -p / <username> ".*" ".*" ".*" // Enumerate permissions rabbitmqctl list_permissions -p <vhost> // Enumerate all user permissions rabbitmqctl list_user_permissions <username> // Clear permissions rabbitmqctl clear_permissions -p <vhost> <username> // Authenticated User rabbitmqctl authenticate_user <username> <password> // Change Password rabbitmqctl change_password <username> <password> // List Users rabbitmqctl list_users // Delete users (deleting users also deletes user-related privileges) rabbitmqctl delete_user <username> // Set tag, tag can be none minimum privilege role, management administrator role, policy maker decision maker, monitoring monitoring, administrator super administrator rabbitmqctl set_user_tags <username> <tag> // Add Virtual Host rabbitmqctl add_vhost <name> // Delete Virtual Host rabbitmqctl delete_vhost <name> // View all virtual hosts rabbitmqctl list_vhost [<vhostinfoitem> ...] // Enumerate all queues on the default virtual machine rabbitmqctl list_queues // List queues on the specified virtual machine rabbitmqctl list_queues -p <vhost> // Enumerate queues, including queue name, number of messages, number of consumers, memory usage, persistence, automatic deletion rabbitmqctl list_queues name messages counsumers memory durable auto_delete // View Switches rabbitmqctl list_exchanges [name] [type] [durable] [auto_delete] // List all bindings rabbitmqctl list_bindings [-p <vhost>]
(2) RabbitMq Managment interface management:
If the input http://localhost:15672/page does not come out, the service may not be on, enter command under sbin to start the service
When created, page symbols are interpreted:
1:D and AD
Declare (create) whether queue b:durable is persisted, queue declaration is stored in memory by default, and if true: rabbitmq restarts the queue without losing the message inside false: queue and message are gone //b1:exclusive: Whether or not the queue is excluded has two roles: one is whether connection.close() automatically deletes the queue when the connection is closed //b2:autoDelete: Whether to delete automatically, whether queues are deleted automatically after the last consumer disconnects, and automatically when consumers = 0 channel.queueDeclare(QUEUE_NAME,true,false,false,null);
The first boolean parameter durable represents whether the queue is persisted or not.Figure D is from durable
A D appears in the figure above, or perhaps a D D D appears in it at the same time, when the second boolean parameter of b2:autoDelete is true
2: How to see how to create a few consumers
3: How to view the switches you created
4: How to view the message consumption line chart in queue