🚀 Get 25% off access to all my premium courses - use discount code FUNCMAIN at checkout - view the pricing page now!


Setting up RabbitMQ locally using Docker

December 6, 2020

Course Instructor: Elliot Forbes

Hey Gophers! My name is Elliot and I'm the creator of TutorialEdge and I've been working with Go systems for roughly 5 years now.

Twitter: @Elliot_f

We’ll start off our journey setting up a locally running instance of RabbitMQ that we can connect to and base our learnings off for now.

In order to run this instance we’ll be using docker as it affords us a number of advantages such as the ability to quickly teardown and spin up a fresh RabbitMQ instance should we mess anything up or want to start from scratch!

So, first things first, you will need to ensure you have docker for desktop installed on your machine so that you can startup and run docker containers. Once you have this installed and available on your path open up a terminal and run the following:

docker run -d --hostname my-rabbit --name some-rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3-management

Now this is going to kick off a RabbitMQ instance in detached mode on localhost port 5672 as well as run the management console on port 15672.

This command may take some time to pull down the RabbitMQ image and build the container, but once it has completed you should be able to verify it’s up and running by running docker ps which should show you all of the containers running on your machine.

Once this has kicked off, try opening up localhost:15672 in your browser and typing guest / guest as your username and password. You should be able to see the management console for your newly instantiated RabbitMQ instance!