This project sets up a RabbitMQ cluster with HAProxy for load balancing using Docker Compose. The cluster consists of six RabbitMQ nodes and one HAProxy instance.
- Docker
- Docker Compose
Create a .env
file in the root of your project with the following content:
RABBITMQ_DEFAULT_USER=your_username
RABBITMQ_DEFAULT_PASS=your_password
To start the RabbitMQ cluster with HAProxy, run the following command in the root of your project:
docker-compose up -d
This will start the RabbitMQ nodes and HAProxy in detached mode.
You can access the RabbitMQ Management UI at http://localhost:15672. Use the credentials specified in the .env file.
To test the RabbitMQ cluster, you can run the following command to create a queue:
python3 test/test.py