Messaging is the easiest and most efficient way to decouple, distribute and scale applications.
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.
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.
Example for Power Panda with one node:
$ heroku addons:add cloudamqp -----> Adding cloudamqp to sharp-mountain-4005... done, v18 (free)
$ heroku addons:create cloudamqp:panda --nodes=1
Once CloudAMQP has been added a
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
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://user:firstname.lastname@example.org/vhost
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.
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.
Currently it is only possible to upgrade/downgrade seamlessly between shared plans, i.e. Little Lemur and Tough Tiger. Use the
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.
CloudAMQP can be removed via the CLI.
$ heroku addons:remove cloudamqp -----> Removing cloudamqp from sharp-mountain-4005... done, v20 (free)
We log errors to your Heroku log, below we explain the different codes.
You've reached your monthly transfer quota. Upgrade to a larger plan or wait until the next calendar month.
You've either upgraded your account (got a higher transfer limit) or it's a new calendar month and your quota has been reseted.
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.
You can now open more connections again because you're not using all connection slots.
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.
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.