AMQP client implementation in Ruby/EventMachine
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1725 commits behind ruby-amqp:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Simple AMQP driver for Ruby/EventMachine
  (c) 2008 Aman Gupta (tmm1)

This library works with Ruby 1.8, Ruby 1.9, JRuby and Rubinius, and is licensed under the Ruby License.

This library was tested primarily with RabbitMQ, although it should be compatible with any
server implementing the AMQP 0-8 spec.

To use with RabbitMQ, first run the server:

  hg clone
  hg clone
  cd rabbitmq-server
  make run

To get started, refer to the various bundled examples:

  ruby examples/mq/pingpong.rb   # 1-1 communication using
  ruby examples/mq/clock.rb      # 1-N communication using amq.fanout
  ruby examples/mq/stocks.rb     # 1-subscriber communication using amq.topic

  ruby examples/mq/multiclock.rb # header based routing (new rabbitmq feature)
  ruby examples/mq/ack.rb        # using ack
  ruby examples/mq/pop.rb        # pop off messages one at a time

  ruby examples/mq/hashtable.rb  # simple async rpc layer
  ruby examples/mq/primes.rb 4   # parallelized prime number generation
  ruby examples/mq/logger.rb     # simple logging api

For more details into the lower level AMQP client API, run the simple client example:

  ruby examples/amqp/simple.rb   # low-level AMQP api
  ruby examples/mq/internal.rb   # low-level Queue/Exchange api

Or refer to protocol/doc.txt, which enumerates packets sent between a server and client
during a typical session, in both binary and decoded formats.

To run the test suite:

  rake spec

The lib/amqp/spec.rb file is generated automatically based on the AMQP specification. To generate it:

  rake codegen

This project was inspired by py-amqplib, rabbitmq, qpid and rubbyt.
Special thanks to Dmitriy Samovskiy, Ben Hood and Tony Garnock-Jones.

AMQP resources:

    RabbitMQ (Rabbit Technologies, Erlang/OTP, MPL) -
    ZeroMQ   (iMatix/FastMQ/Intel, C++, GPL3)       -
    OpenAMQ  (iMatix, C, GPL2)                      -
    ActiveMQ (Apache Foundation, Java, apache2)     -

  Steve Vinoski explains AMQP in his column, Towards Integration

  John O'Hara on the history of AMQP

  Dmitriy's presentation on RabbitMQ/AMQP

  ZeroMQ's analysis of the messaging technology market

  Pieter Hintjens's background to AMQP

  Barry Pederson's py-amqplib

  Ben Hood on writing an AMQP client

  Dmitriy Samovskiy introduces Ruby + QPid + RabbitMQ

  Ben Hood's as3-amqp

  RabbitMQ's protocol code generator

  Erlang Exchange presentation on the implementation of RabbitMQ

  Jonathan Conway's series on RabbitMQ and using it with Ruby/Merb

  Open Enterprise's series on messaging middleware and AMQP

Messaging and distributed systems resources:

  A Critique of the Remote Procedure Call Paradigm

  A Note on Distributed Computing

  Convenience Over Correctness

  Metaprotocol Taxonomy and Communications Patterns

  Joe Armstrong on Erlang messaging vs RPC

  SEDA: scalable internet services using message queues