Running RabbitMQ on Docker

As our example also uses RabbitMQ, let's explore how to set up RabbitMQ as a Docker container. The following command pulls the RabbitMQ image from Docker Hub and starts RabbitMQ:

docker run –net host rabbitmq3

Ensure that the URL in *-service.properties is changed to the Docker host's IP address. Apply the earlier rule to find out the IP address in the case of Mac or Windows.

Get Spring Microservices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.