RabbitMQ Bigwig

This add-on is operated by LShift Ltd

Easy to use, scalable cloud messaging from LShift

RabbitMQ Bigwig

Last Updated: 09 June 2015

Table of Contents

RabbitMQ Bigwig is an Add-on for adding an AMQP message broker to your application.

RabbitMQ provides robust messaging for applications. It is easy to use and supported on all major operating systems and developer platforms.

Messaging enables software applications to connect and scale. Applications can connect to each other, as components of a larger application, or to user devices and data. Messaging is asynchronous, decoupling applications by separating the sending and receiving of data.

The RabbitMQ™ Bigwig add-on is brought to you by LShift. We are a software development company with expertise in VMware’s vFabric™ RabbitMQ™ and a VMware partner. We were also one of the founding companies behind the original development of RabbitMQ™.

RabbitMQ was built from the ground up to interoperate with other technologies: it is the leading implementation of AMQP, the open standard for business messaging.

RabbitMQ can carry any type of message and there are many design patterns you can use to fulfil your use case.

RabbitMQ Bigwig is accessible via an API and has supported client libraries for Ruby, Java, Python, Clojure, Erlang and C#.

Provisioning the add-on

You can attach RabbitMQ Bigwig to a Heroku application via the CLI:

You can find a list of all plans available here.
$ heroku addons:create rabbitmq-bigwig
-----> Adding rabbitmq-bigwig to sharp-mountain-4005... done, v18 (free)

Once you have added RabbitMQ Bigwig you will find RABBITMQ_BIGWIG_TX_URL and RABBITMQ_BIGWIG_RX_URL settings in the app configuration. These contain the canonical URLs used to access the newly provisioned RabbitMQ Bigwig service instance. You can confirm this using the heroku config:get command.

$ heroku config:get RABBITMQ_BIGWIG_RX_URL
$ heroku config:get RABBITMQ_BIGWIG_TX_URL

We give you two URLs to ease separating your producers from your consumers. Producers connect to the URL in RABBITMQ_BIGWIG_TX_URL, and we shape this connection to provide consistent throughput. Consumers connect to the URL in RABBITMQ_BIGWIG_RX_URL. We optimise connections to this URL for the consumer case. This separation of producers and consumers follows RabbitMQ best practice. You can read more about how and why we shape here.

After installing RabbitMQ Bigwig you should configure the application to fully integrate with the add-on.

Using with Rails 3.x

Two popular AMQP client libraries for Ruby are the bunny and amqp gems. The amqp gem uses the asynchronous EventMachine framework, and so is not a good fit for a Rails application. Thus, use the bunny gem. Add it to your Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.0.10'
gem 'sqlite3'
gem 'bunny'


After modifying Gemfile, run bundle install to update Gemfile.lock:

$ bundle install
Fetching source index for https://rubygems.org/
Using rake (0.9.2)
Using rails (3.0.10)
Your bundle is complete! Use `bundle show [gemname]` to see where
a bundled gem is installed.

For a full example of using Bigwig and the Bunny gem with Rails, please check out our example rails application. Once that’s checked out, you’ll be able to deploy that to heroku by running the following shell commands:

$ git clone git://github.com/lshift/rabbitmq-service-rails-sample.git
$ cd rabbitmq-service-rails-sample
$ heroku apps:create
$ heroku addons:create rabbitmq-bigwig
$ git push heroku master
$ heroku apps:open

The command heroku apps:open should open the sample application in your web-browser. If it can’t figure out how to open a browser on your platform, then visiting the URL previously output by heroku apps:create with any browser will work fine.

Using with Ruby (more generally)

The amqp gem is especially appropriate when running on a worker dyno, as it supports writing software that reacts to external events. For example, the following example will listen for messages on the amqpgem.examples.hello_world queue, and exit 60 seconds after it receives the first message.

require "rubygems"
require 'amqp'
require "amqp/extensions/rabbitmq"

EventMachine.run do
  connection = AMQP.connect(:host => '', :port => 5672, :vhost => 'a')
  puts "Connecting to AMQP broker. Running #{AMQP::VERSION} version of the gem..."

  channel  = AMQP::Channel.new(connection)
  channel.queue("amqpgem.examples.hello_world", :auto_delete => true, :nowait => true) do |queue|
    exchange = channel.default_exchange

    queue.subscribe do |payload|
      puts "Received a message: #{payload}. Disconnecting..."

      EventMachine::Timer.new(60) do
        connection.close {
          EventMachine.stop { exit }

    exchange.publish "Hello, world!", :routing_key => queue.name

Development environment

You can install RabbitMQ Bigwig for use in a local development environment. Typically this entails installing RabbitMQ and pointing the RABBITMQ_BIGWIG_TX_URL and RABBITMQ_BIGWIG_RX_URL URLs to this local service via export RABBITMQ_BIGWIG_TX_URL=amqp://guest:guest@localhost/ RABBITMQ_BIGWIG_RX_URL=amqp://guest:guest@localhost/.

RabbitMQ Bigwig uses version 3.0.4. In order to rule out possible differences in behaviour between RabbitMQ versions, you should install version 3.0.4.

If you have… Install with…
Mac OS X
cd /usr/local/
git checkout 181e445c5701070adb63ac3365c68040f26f6a6a Library/Formula/rabbitmq.rb
brew install rabbitmq
Windows http://www.rabbitmq.com/install-windows.html but use this installer instead: http://www.rabbitmq.com/releases/rabbitmq-server/v3.0.4/rabbitmq-server-3.0.4.exe
Debian-like Linux (Debian, Ubuntu, …) Run as root:
$ export DEBIAN_FRONTEND=noninteractive
$ wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc -O /tmp/rabbitmq-signing-key-public.asc
$ apt-key add /tmp/rabbitmq-signing-key-public.asc
$ rm /tmp/rabbitmq-signing-key-public.asc
$ apt-get -y update # Report any bad checksums
$ apt-get -y install erlang-nox=1:14.b.4-dfsg-1ubuntu1
$ wget -O /tmp/package-rmq.deb http://www.rabbitmq.com/releases/rabbitmq-server/v3.0.4/rabbitmq-server_3.0.4-1_all.deb
$ dpkg -i /tmp/package-rmq.deb
$ rm /tmp/package-rmq.deb
Note that Lucid Lynx’s latest Erlang version is `1:13.b.3-dfsg-2ubuntu2.1`.
Other (BSD, Solaris) http://www.rabbitmq.com/releases/rabbitmq-server/v3.0.4/rabbitmq-server-generic-unix-3.0.4.tar.gz

While RabbitMQ will run on Erlang version R12 or above, following RabbitMQ’s advice on which Erlang to use, we strongly suggest using R15 or R16. If you’re running a recent Linux distribution (e.g., Ubuntu Oneiric Ocelot or Precise Pangolin), you shouldn’t have any trouble here, nor should you encounter problems using the installers for either Windows or Mac OS X.


For more information on the features available within the RabbitMQ Bigwig dashboard please see the docs on RabbitMQ’s management plugin.

The RabbitMQ Bigwig dashboard allows you to keep close watch over your broker, controlling your exchanges, queues, bindings, users, and so on.

RabbitMQ Bigwig Dashboard

You can access the dashboard via the CLI:

$ heroku addons:open rabbitmq-bigwig
Opening rabbitmq-bigwig for sharp-mountain-4005...

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

Management API

RabbitMQ has a comprehensive HTTP management API which is documented here. The URLs in the documentation are relative to your dashboard URL, and require the same credentials as your AMQP URLs. You can find a link to the root of the HTTP management API in the footer of your dashboard. (The link text is ‘HTTP API’.) For example, the root of the API for one of our test instances is https://bigwig.lshift.net/management/24172/api/.

Unfortunately it’s not currently possible to use the rabbitmqadmin command line tool with Bigwig instances.

Migrating between plans

We don’t currently support seamless migration between plans. If you want to change your plan, you will need to remove the add-on, then add it again. For advice on how to minimize the impact of this approach, please contact support.

Removing the add-on

You can remove RabbitMQ Bigwig via the CLI.

This will destroy all associated data and cannot be undone!
$ heroku addons:destroy rabbitmq-bigwig
-----> Removing rabbitmq-bigwig from sharp-mountain-4005... done, v20 (free)

Please consume all your messages from your queues before removing the add-on as removal will destroy all data and cannot be undone. Use the web dashboard to confirm.


Please submit all RabbitMQ Bigwig support and runtime issues via one of the Heroku Support channels or directly to us at bigwig.support@lshift.net.

Additional resources

Additional resources are available at: