CloudAMQP at Heroku Getting started

CloudAMQP is an add-on providing RabbitMQ as a service. RabbitMQ is a high performance message broker, built in Erlang, which implements the AMQP protocol.

Messaging is the easiest and most efficient way to decouple, distribute and scale applications.

All AMQP client libraries work with CloudAMQP and there are AMQP client libraries for almost every platform out there, including Ruby, Node.js, Java, Python, Clojure and Erlang.

Your CloudAMQP instance is created in the same cloud and region as your Heroku account. If your application is located in AWS us-east-1, then your CloudAMQP instance is created in the same one.

Installing the add-on Via the CLI

CloudAMQP can be installed to a Heroku application via the CLI:

A list of all plans available can be found here.

The number of nodes can be specified for instances on plan Roaring Rabbit and larger. The default setting for those instancs are two nodes - it will give you two mirrored nodes. If you choose one node it will give you twice the performance and three nodes will half the performace but give you pause minitory on partitions. The number of nodes can be specified when you create your instance with the parameter --nodes.

$ heroku addons:add cloudamqp
-----> Adding cloudamqp to sharp-mountain-4005... done, v18 (free)
Example for Power Panda with one node:
$ heroku addons:create cloudamqp:panda --nodes=1

Once CloudAMQP has been added a CLOUDAMQP_URL setting will be available in the app configuration and will contain the canonical URL used to access the RabbitMQ cluster. This can be confirmed using the heroku config command. If you have multiple CloudAMQP instances, you need to check in the app configuration for correct URL for the App.

After installing CloudAMQP the application should be configured to fully integrate with the add-on.

$ heroku config | grep CLOUDAMQP_URL
CLOUDAMQP_URL    => amqp://


The CloudAMQP dashboard allows you to show the current message rate, which queues and exchanges you have, and the bindings between them. You can also queue and pop messages manually, among other things.

CloudAMQP Dashboard

The dashboard can be accessed via the CLI:

$ heroku addons:open cloudamqp
Opening cloudamqp for sharp-mountain-4005…

or by visiting the Heroku apps web interface and selecting the application in question. Select CloudAMQP from the Add-ons menu.

Migrating between plans

Currently it is only possible to upgrade/downgrade seamlessly between shared plans, i.e. Little Lemur and Tough Tiger. Use the heroku addons:upgrade command to migrate to a new plan.

$ heroku addons:upgrade cloudamqp:tiger
-----> Upgrading cloudamqp:tiger to sharp-mountain-4005... done, v18 ($19/mo)
       Your plan has been updated to: cloudamqp:tiger

There is no automatic upgrade between dedicated plans or to/from a dedicated plan but it is possible to have multiple CloudAMQP addons on one app. We recommend you to create the new plan and point your publishers to the new plan. Let your consumers empty the queues on the old plan and then point them to the new plan and finally delete the old plan.

Removing the add-on

This will destroy all associated data and cannot be undone!

CloudAMQP can be removed via the CLI.

$ heroku addons:remove cloudamqp
-----> Removing cloudamqp from sharp-mountain-4005... done, v20 (free)

Error codes

We log errors to your Heroku log, below we explain the different codes.

410 - Transfer limit reached

You've reached your monthly transfer quota. Upgrade to a larger plan or wait until the next calendar month.

210 - Transfer in compliance

You've either upgraded your account (got a higher transfer limit) or it's a new calendar month and your quota has been reseted.

420 - Connection limit reached

You're using all your connection slots so new connections will be blocked. Either lower your connection count or upgrade to larger plan to accommodate more connections.

220 - Connections in compliance

You can now open more connections again because you're not using all connection slots.

431 - Max channels per connection

One of your connections was closed because you'd open to many channels on it. This is often due to a bug, so check your code and make sure that you close unused channels.

432 - Max consumers per connection

One of your connections was closed because it had opened more than 12000 consumers. This is often due to a bug, so make sure that you close unused consumers.


All CloudAMQP support and runtime issues can be logged with Heroku Support at or