RabbitMQ

Instructions for setup of rabbitmq on local docker desktop

Configuration

Until requirements make more advanced configurations necessary, the following patterns shall be followed:

  • All message producers and consumers shall use the default direct exchange, named 'amq.direct'

  • Queues are created and bound to amq.direct by consumer microservices

    • In most cases the default routing is enough. Default routing states that the queue name and routing key are a direct match.

  • Producers emit messages with documented routing keys

Resources

Terraform configuration

Background on rabbitmq configuration: https://www.cloudamqp.com/blog/part4-rabbitmq-for-beginners-exchanges-routing-keys-bindings.html

Running RabbitMQ on Docker Kubernetes

Required

  • Docker Desktop with Kubernetes Enabled

  • Fork/Clone the current Greenstand Greenstand Infrastructure Repo, the code for the Greenstand RabbitMQ infrastructure is in the RabbitMQ folder

  • kubectl

How to run

In the deployment folder the deploy-dev.sh file contains the scripts to set up the RabbitMQ cluster and PodMonitor for the RabbitMQ pods.

Since we're running on local docker-desktop kubernetes cluster, we'll need to change the name cluster name in the deploy-dev.sh.

Install CRDs

RabbitmqCluster CRD

PodMonitor CRD

Create Namespace

For Rabbitmq Greenstand is using the "rabbitmq-cluster" namespace, to create the namespace on your docker kubernetes cluster refer to the docs here.

Last updated

Was this helpful?