Skip to content

messaging

Benjamin Bennett edited this page Dec 12, 2020 · 15 revisions

This is a simple implementation of message publishing using RabbitMQ and a Go RabbitMQ Client Library.

cd go-bits/messaging
docker-compose up
go run -race main.go
  1. A connection manager is created and handles:
    • Initial connection to RabbitMQ and automated re-connection if the connection is closed.
    • Obtaining a server channel (not to be confused with a go channel).
  2. Connection to RabbitMQ is initiated.
  3. A queue is configured.
  4. A message publisher is created.
  5. Loop is used to publish messages.
Clone this wiki locally