Deploy and Connect to RabbitMQ on PipeOps | PipeOps

Deploy and Connect to RabbitMQ on PipeOps

RabbitMQ is an open-source message broker that facilitates reliable communication between services using a queue system. This guide walks you through deploying RabbitMQ on PipeOps, connecting an application to it, and verifying the connection works as expected.

Deploy RabbitMQ

Wait for the instance to finish provisioning. This usually takes a few seconds.

Note: By default, the RabbitMQ instance starts with minimal CPU and memory to save costs. If you ever feel like your RabbitMQ is slow you can increase the resource (CPU cores and memory) from the AddOn settings tab.

Retrieve RabbitMQ Credentials

Once the RabbitMQ instance is running:

Copy the values for the following variables:

You’ll use these to log in to the RabbitMQ instance.

Access the RabbitMQ Dashboard

Click the "View Addon" button to open your RabbitMQ dashboard.

Use the default username and password from the previous step to log in.

You should now see an empty RabbitMQ dashboard with no queues or connections yet.

Deploy Your Application

Deploy your application that will communicate with RabbitMQ. For this guide, we're deploying a Go project that acts as both a consumer and a publisher for RabbitMQ.

Upon receiving the RabbitMQ URL, the application connects to it, declares a queue to ensure it exists, creates a consumer to listen for incoming messages, and begins publishing messages to that queue.

Follow these steps to deploy your application:

Connect Your App to RabbitMQ

Example: amqp://cb3a72edfs74:a30e6136dcd21d90ad06f3067d50610c@damp-lake:5672

Once the environment variable is set and the app is redeployed, go back to the RabbitMQ dashboard. You should now see an active connection from your application to RabbitMQ and a queue created.

👍That's it. You’ve now successfully deployed RabbitMQ and connected to your application.