RabbitMQ installation and configuration |
RabbitMQ is an open-source implementation of AMQP (Advanced Message Queuing Protocol), used to store and forward messages in the distributed system, and performs well in usability, scalability, and availability. Since it is developed with Erlang, so you need to install Erlang first.
Erlang official website download address: http://www.erlang.org/downloads.html
RabbitMQ official website download address: http://www.rabbitmq.com/download.html
Since the installation of Erlang and RabbitMQ is very simple, the process won't be introduced here. After RabbitMQ has been installed successfully, it will be automatically started and automatically registered as a Windows service.
Here we take RabbitMQ installed under the Windows system as an example to introduce the configuration of RabbitMQ Server:
By default, RabbitMQ Server creates a user named guest with the administrator role, which has all the permissions of RabbitMQ. For security reasons, guest users can only log in through localhost. If you need to connect to RabbitMQ Server remotely, it is recommended that you create your own user, set a password, and grant permissions, and set it as an administrator, for example: create a user: user1, password: iportal, role: administrator, permission: all permissions. Then open cmd with the administrator privileges, switch to the [RabbitMQ Server installation directory]/sbin directory, and enter the following command:
rabbitmqctl add_user user1 iportal
rabbitmqctl set_user_tags user1 administrator
rabbitmqctl set_permissions -p "/" user1 ".*" ".*" ".*"
The rabbitmqctl.bat is used to manage RabbitMQ Server. You can use the rabbitmqctl command to perform user management (such as: add, delete users, modify passwords, assign roles, permissions, etc.), virtual host management (such as: add, delete virtual hosts ), and so on. For more information about rabbitmqct operation commands, please refer to RabbitMQ official website: http://www.rabbitmq.com.html.