I Know What RabbitMQ and Bunny are, How Do I Get Started?

What is Bunny Good For?

One can use Bunny to make Ruby applications interoperate with other
applications (both built in Ruby and not). Complexity and size may vary from
simple work queues to complex multi-stage data processing workflows that involve
many applications built with all kinds of technologies.

Specific examples:

Events collectors, metrics & analytics applications can aggregate events produced by various applications
(Web and not) in the company network.

A Web application may route messages to a Java app that works
with SMS delivery gateways.

MMO games can use flexible routing RabbitMQ provides to propagate event notifications to players and locations.

Price updates from public markets or other sources can be distributed between interested parties, from trading systems to points of sale in a specific geographic region.

Content aggregators may update full-text search and geospatial search indexes
by delegating actual indexing work to other applications over RabbitMQ.

Companies may provide streaming/push APIs to their customers, partners
or just general public.

Continuous integration systems can distribute builds between multiple machines with various hardware and software
configurations using advanced routing features of RabbitMQ.

An application that watches updates from a real-time stream (be it markets data
or Twitter stream) can propagate updates to interested parties, including
Web applications that display that information in the real time.

Supported Ruby Versions

Modern Bunny versions support

CRuby 2.2 through 2.5 (inclusive)

Bunny works sufficiently well on JRuby but there are known
JRuby bugs in versions prior to JRuby 9000 that cause high CPU burn. JRuby users should
use March Hare.

Bunny 1.7.x was the last version to support CRuby 1.9.3 and 1.8.7

Supported RabbitMQ Versions

Bunny 1.5.0 and later versions only support RabbitMQ 3.3+.
Bunny 1.4.x and earlier supports RabbitMQ 2.x and 3.x.

Change Log

Bunny is a mature library (started in early 2009) with
a stable public API.

require"bunny"# Start a communication session with RabbitMQ
conn=Bunny.newconn.start# open a channel
ch=conn.create_channel# declare a queue
q=ch.queue("test1")# publish a message to the default exchange which then gets routed to this queue
q.publish("Hello, everybody!")# fetch a message from the queue
delivery_info,metadata,payload=q.popputs"This is the message: #{payload}"# close the connection
conn.stop

API Reference

Community and Getting Help

Mailing List

Bunny has a mailing list. Please use it for all questions,
investigations, and discussions. GitHub issues should be used for specific, well understood, actionable
maintainers and contributors can work on.

We encourage you to also join the RabbitMQ mailing list
mailing list. Feel free to ask any questions that you may have.

Continuous Integration

News & Announcements on Twitter

To subscribe for announcements of releases, important changes and so on, please follow @rubyamqp on Twitter.