How to get started with RabbitMQ on CloudAMQP

Here's a step by step guide on how you can set up LavinMQ at CloudAMQP. Before you start, head over to the CloudAMQP getting started section and read the guide on how to activate your CloudAMQP account.

  1. Create your RabbitMQ server (instance) in your selected cloud
  2. Complete a setup checklist for your new instance

New to RabbitMQ? We’ve got your back

Select plan

Start by selecting a pricing plan. Your choice of plan depends on several things and this guide walks you through the options and describes when to use which pricing plan.

CloudAMQP offers eight different plans, both dedicated RabbitMQ clusters with single or multiple nodes, or a multitenant server where you are given a vhost on a shared RabbitMQ server.

The different plan options are available on the pricing page:

Dedicated Instances

A dedicated plan is not artificially limited in any way and therefore highly recommended for your production environment. The maximum performance is determined by the underlying instance type and the number of nodes in the setup.

The price is per node, and all nodes on a given pricing plan have the same performance. Cost is based on the number of nodes in your cluster; the more nodes you have, the more it will cost.

The speed given on the pricing page is the burst speed, the maximum number of messages you can send per second, for your instance, during a certain amount of time. The given number of messages per second depends on the type of routing, size of messages, how many consumers/publishers used, datacenter, auto acknowledgment/persistence flags, etc.

The number of supported connections raises with the number of nodes you have in the cluster.

1 node: Best performance, cold standby for high availability, always consistent

Single node plans are the fastest and most simple ones. All data written to disk is safe. The data on a single node setup is always consistent since no data needs to be written to another RabbitMQ server.

3 nodes cluster: Data replicated over 3 nodes in 2 AZs

A CloudAMQP cluster with three nodes gives three RabbitMQ servers. These servers are placed in different zones (availability zones in AWS) in all data centers with support for zones.

5 nodes: Data replicated over 5 nodes in 3 AZs

A CloudAMQP cluster with five nodes gives five RabbitMQ servers. The servers are divided into different availability zones in data centers with support for zones. Two nodes will be allocated in one zone, two in the next, and the final node in a third zone.

Shared Instances

A shared instance is a virtual host (vhost) located on a shared server where other users’ actions might affect the performance of the whole server. All shared plans have a channel limit set to 200 and a maximum of 200 consumers per channel.

We recommend shared plans for testing or hobby applications.

Create the instance

Select a name for the instance and the selected pricing plan. A tag can also be added to separate instances between different projects.

Name Name on the instance. The name helps you to remember where you use the instance.
Plan The CloudAMQP pricing plan.
Tag (optional) Tags helps you separate instances between projects. They facilitate the project listing view for easier navigation and access control. E.g., "Test,” “Prod,” “Staging.”

Select a region and data center

Create the instance in the selected data center. CloudAMQP is available in all major clouds.

Data center Select the same data center and region as your applications.

Select configuration

Select the number of nodes in the cluster, along with a RabbitMQ version. The default version in the drop-down menu is the CloudAMQP recommended version.

It is possible to set up a peering connection between a VPC and a CloudAMQP VPC. More information about how to do that is described here.

Nodes Specify the number of nodes in the cluster.
RabbitMQ version The default version is the version recommended by CloudAMQP.
Dedicated VPC VPC peering with the CloudAMQP instance. The VPC subnet must be specified when creating a VPC.
Copy settings Copies settings like alarms or firewall configurations from another instance.

Confirm new instance

The final step is to verify the information provided and then press Create instance. The new instance is immediately provisioned, and all your instances can be viewed in the CloudAMQP Console. Instances can be connected in just a few minutes.

Instance details such as connection URL, server name, user/vhost, and password can be found on the details page in the CloudAMQP console.

Configure the new instance

CloudAMQP offers various monitoring tools and configuration settings, all available from the CloudAMQP console. Alarms can be set up that address performance issues promptly and automatically before they impact your business. The RabbitMQ log is available via the console, as well as server metrics. It’s possible to enable and disable plugins and specify a firewall.

RabbitMQ Management Interface

The RabbitMQ management interface is available by pressing the green button in the top left corner. This interface visualizes your RabbitMQ instance and shows, for example, the current message rate, queues and exchanges created, and the bindings between them. The management interface also makes it possible to create queues and publish messages manually, among other things.

Connect to the instance

It is time to start sending and receiving messages from your broker. The AMQP URL is available on the details page in the CloudAMQP console. We recommend setting up an environment variable, e.g., CLOUDAMQP_URL and letting your deployments connect to a RabbitMQ instance in CloudAMQP using this variable.

Sample code is available for most languages.

Ensure to complete the following step before moving on;

  1. Set up your instance in your selected cloud
  2. Get familiar with RabbitMQ management
  3. Get familiar with the CloudAMQP console
  4. Get familiar with Prometheus

You're now acquainted with the basics and ready to send your first messages, congratulations! Bookmark this checklist to refer back to when setting up a production environment in RabbitMQ.

Checklist for production environment

  1. RabbitMQ and Erlang version
    Use one of the latest RabbitMQ and Erlang versions.
  2. Environment variables
    Ensure to use an environment variable instead of having connection details in your code.
  3. Use the hostname Use the cluster hostname when connecting your clients. Do not use the server's IP address when connecting, as that might change.
  4. Configure the firewall A firewall lets you restrict access to your cluster to which only your servers will have access.
  5. Set up CloudAMQP alarms
    1. Add a recipient.
    2. We configure some recommended alarms by default, but it’s
    3. recommended to set up queue, connections, consumer, and channel alarms according to your use case.
  6. Use quorum queues If you have a multi-node cluster, use quorum queues instead of classic mirrored queues.
  7. Tweak configurations CloudAMQP configures your RabbitMQ cluster, but some configurations can be changed in the Configurations view according to your needs. If you want to tweak other configurations, not in this tab, send us an email to and we can help you out. Available configurations in the Configuration tab are:
    1. Server heartbeat value.
    2. The maximum number of channels per connection.
    3. The maximum number of connections.
    4. Consumer timeout value if the consumer is not acknowledging messages.
    5. Memory high watermark.
    6. A message that is smaller than configured queue_index_embed_msgs_below is written directly to the queue index.
    7. Default vhost
    8. MQTT Exchange
    9. Log exchange level
  8. Persistent messages and durable queues If using classic queues, make sure to use persistent messages and durable queues for messages to survive a restart.
  9. VPC or Privatelink If using a VPC or Privatelink, create peerings to your services.
  10. Export metrics and logs Metrics and logs can be exported to third-party providers such as CloudWatch, Datadog, Newrelic, Stackdriver, Librato, Papertrail, Loggly, Logentries, and Splunk.
  11. Enable plugins We enabled a couple of plugins by default, for example, Shovels, Federations, and RabbitMQ Management, but you can enable/disable other plugins from the Plugin view.
  12. Custom domain To use a custom domain, generate a certificate by just setting up a record and enabling it. You can also upload your certificate in the Custom Domain view.