Initiating and Monitoring Message Queuing

Learn how to initiate and monitor the RabbitMQ message queuing service with Docker Compose.

Previously, we learned that message queuing is a form of asynchronous service-to-service communication used in microservices architectures. Let’s look at how we initiate and monitor message queuing.

Initiating the queuing service

For us to initiate the RabbitMQ message queues, we must specify the queuing service in the docker-compose.yml files of the various microservices. In our case, we'll add the queuing service to the docker-compose.yml files of both the Config app in the backendservice1 directory and the Core app in the backendservice2 directory of our web application.

Adding the queuing service to the backendservice1 directory

Let’s add the queuing service for the Config and Houses apps. To do this, we'll open the docker-compose.yml file in the backendservice1 directory and add these highlighted lines of code:

Get hands-on with 1400+ tech skills courses.