Ruby amqp gem: the asynchronous Ruby RabbitMQ client

A Word of Warning: Use This Only If You Already Use EventMachine

Unless you already use EventMachine, there is no real reason to
use this client. Consider Bunny or March Hare instead.

amqp gem brings in a fair share of EventMachine complexity which
cannot be fully eliminated. Event loop blocking, writes that happen
at the end of loop tick, uncaught exceptions in event loop silently killing it:
it's not worth the pain unless you've already deeply invested in EventMachine
and understand how it works.

I know what RabbitMQ is, how do I get started?

What is RabbitMQ?

RabbitMQ is an open source messaging middleware that emphasizes
interoperability between different technologies (for example, Java,
.NET, Ruby, Python, Node.js, Erlang, Go, C and so on).

Key features of RabbitMQ are very flexible yet simple routing and
binary protocol efficiency. RabbitMQ supports many sophisticated
features, for example, message acknowledgements, queue length limit,
message TTL, redelivery of messages that couldn't be processed, load
balancing between message consumers and so on.

What is amqp gem good for?

One can use amqp gem to make Ruby applications interoperate with other
applications (both Ruby and not). Complexity and size may vary from
simple work queues to complex multi-stage data processing workflows that involve
dozens or hundreds of 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 AMQP 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 AMQP.

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 AMQP.

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

Documentation: tutorials, guides & API reference

We believe that in order to be a library our users really love, we need to care about documentation as much as (or more)
code readability, API beauty and autotomated testing across 5 Ruby implementations on multiple operating systems. We do care
about our documentation: if you don't find your answer in documentation, we consider it a high severity bug that you
should file to us. Or just complain to @rubyamqp on Twitter.

Weathr, an example of sophisticated routing capabilities AMQP 0.9.1 has to offer (1-to-many or many-to-many communication)

all in under 20 minutes. AMQP 0.9.1 Concepts will introduce you to protocol concepts
in less than 5 minutes.

Guides

Documentation guides describe the library itself as well as AMQP concepts, usage scenarios, topics like working with exchanges and queues,
error handing & recovery, broker-specific extensions, TLS support, troubleshooting and so on. Most of the documentation is in these guides.

Examples

You can find many examples (both real-world cases and simple demonstrations) under examples directory in the repository.
Note that those examples are written against version 0.8.0.rc1 and later. 0.6.x and 0.7.x may not support certain AMQP protocol or "DSL syntax" features.