RabbitMQ Installation and Configuration
This document describes installation and configuration of RabbitMQ Message Broker.
Docker Quick Start
Create and Start Container
To pull RabbitMQ docker image from DockerHub run the following command:
docker pull rabbitmq:3.9-management
Create RabbitMQ docker container:
docker create --name rabbit --hostname rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3.9-management
Start RabbitMQ container:
docker start rabbit
Check that RabbitMQ is running:
curl -u guest:guest http://localhost:15672/api/cluster-name
You should get following response:
{"name":"rabbit@rabbit"}
Create Harvest User
To run commands in RabbitMQ container, execute an interactive bash shell in the container:
docker exec -it rabbit bash
Now we can create "harvest" user. In this example we will make "harvest" user an administrator.
rabbitmqctl add_user harvest harvest1234 rabbitmqctl set_user_tags harvest administrator rabbitmqctl set_permissions -p / harvest ".*" ".*" ".*"
Optionally change password for "guest" user:
rabbitmqctl change_password guest guest1234
Or completely delete "guest" user:
rabbitmqctl delete_user guest
Create Queues
rabbitmqadmin declare queue -u harvest -p harvest1234 --vhost=/ name=harvest.jobs durable=true rabbitmqadmin declare queue -u harvest -p harvest1234 --vhost=/ name=harvest.dirs durable=true rabbitmqadmin declare queue -u harvest -p harvest1234 --vhost=/ name=harvest.products durable=true rabbitmqadmin declare queue -u harvest -p harvest1234 --vhost=/ name=harvest.collections durable=true
Linux, Windows, MacOS
Installation guides for Linux, Windows, and MacOS are available on RabbitMQ web site. After installing RabbitMQ, create "harvest" user (optional) and harvest queues (required) as described in previous section.