Introduction
RabbitMQ is used for message queuing. Various services in MPS use rabbitmq to pass messages among each other.
Instructions
RabbitMQ can be installed directly or run via docker container. We need to enable the management plugin for rabbitmq.
Steps for installing and configuring rabbitmq:
-
Install from repository:
apt install rabbitmq-server
-
Create administrator user
rabbitmqctl add_user admin adminpassword
- Syntax:
rabbitmqctl add_user admin adminpassword
- The above command creates a user admin with password adminpassword. Change it as per requirement
-
Grant administrator privilege to the user that was just created
rabbitmqctl set_user_tags admin administrator
- The above command sets administrator tag to the user admin
-
Grant permission to vhost “/” for the created user
rabbitmqctl set_permissions -p / admin “.*” “.*” “.*”
**Note:** ‘admin’ is the sample administrator username used in this article. You can use any username you want.
**Note:** If you are using AWS, make sure to open the required ports.
**Note:** If you are using Docker containers for rabbitmq, make sure to forward the ports as per requirements