RabbitMQ

RabbitMQ is a popular open source message broker written in Erlang. It uses a protocol called the Advanced Message Queueing Protocol (AMQP) in order to pass messages through its queueing system. Without further ado, let's set up a RabbitMQ instance and pass messages to and from it using Go:

  1. First, we need to start up a RabbitMQ instance using Docker:
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
  1. Then, we have a RabbitMQ instance, complete with the management portal, running on our host.
  2. Now, we can use the Go AMQP library (https://github.com/streadway/amqp) in order to pass messages to and from our RabbitMQ system with Go.

We will start by creating a listener. Let's see this procedure step by ...

Get Hands-On High Performance with Go 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.