- Docker Desktop
- Open terminal to project directory
- Run
docker compose up -d
- This may take a minute or two
- After building the docker-compose
- Open your browser and go to
localhost:15672
- Use the default login. User & Pass is
guest
- Click on 'Admin' tab
- Click on 'Virtual Hosts' on the right side of the web page
- In the 'Name' input enter:
testHost
- Click "Add virtual host"
- Click on 'Users' on the right side of the web page
- In the 'Username' input enter:
test
- In both 'Password' inputs enter:
test
- Click 'Add user'
- Click the 'test' on the top of the webpage
- Under 'Set permission'
- Change 'Virtual Host' in dropdown to
testHost
- Click 'Set permission'
- Click 'Exchanges'
- Under 'Add a new exchange'
- Change 'Virtual Host' in dropdown to
testHost
- In the 'Name' input enter:
testExchange
- Click 'Add exchange'
- Click on 'Queues'
- Under 'Add a new queue'
- Change 'Virtual Host' in dropdown to
testHost
- In the 'Name' input enter:
testQueue
- Click
testQueue
- Under 'Bindings'
- In the 'From exchange' input enter:
testExchange
- In the 'Routing key' input enter:
*
- Click 'Bind'
- The RabbitMQ Server is now ready for the listener and client
- After building the docker-compose
- Run
docker exec -ti rabbit-client-1 /bin/bash
- Once loaded into the container, Run
php testRabbitMQClient.php "[Message]"
- From there the rabbit listener will have your message
- Run the following command
docker compose build