Utility code to obtain the RabbitMQ service connection information on multiple PaaSes. The returned connection info can then be passed to common Ruby AMQP client libraries, such as the amqp gem or bunny gem
Currently supports Cloud Foundry and Heroku.
Add the rubygem to your application's Gemfile:
gem 'rabbitmq-service-util'
require 'rabbitmq-service-util'
# If using the amqp gem
connection = AMQP.connect(RabbitMQ::amqp_connection_url)
# If using the bunny gem
connection = Bunny.new(RabbitMQ::amqp_connection_url)