Ruby AMQP: all documentation guides

Getting Started with Ruby amqp gem and RabbitMQ

An overview of amqp gem with a quick tutorial that helps you to get started with it. It should take about 20 minutes to read and study the provided code examples.

AMQP 0.9.1 Model Explained

This guide covers:

  • AMQP 0.9.1 model overview
  • What are channels
  • What are vhosts
  • What are queues
  • What are exchanges
  • What are bindings
  • What are AMQP 0.9.1 classes and methods

Connecting to RabbitMQ

This guide covers:

  • How to connect to RabbitMQ with amqp gem
  • How to use connection URI to connect to RabbitMQ (also: in PaaS environments such as Heroku and CloudFoundry)
  • How to open a channel
  • How to close a channel
  • How to disconnect

Working With Queues

This guide covers:

  • How to declare AMQP queues with amqp gem
  • Queue properties
  • How to declare server-named queues
  • How to declare temporary exclusive queues
  • How to consume messages ("push API")
  • How to fetch messages ("pull API")
  • Message and delivery properties
  • Message acknowledgements
  • How to purge queues
  • How to delete queues
  • Other topics related to queues

Working With Exchanges

This guide covers:

  • Exchange types
  • How to declare AMQP exchanges with amqp gem
  • How to publish messages
  • Exchange propreties
  • Fanout exchanges
  • Direct exchanges
  • Topic exchanges
  • Default exchange
  • Message and delivery properties
  • Message routing
  • Bindings
  • How to delete exchanges
  • Other topics related to exchanges and publishing

Working with bindings

This guide covers:

  • How to bind exchanges to queues
  • How to unbind exchanges from queues
  • Other topics related to bindings

This guide covers:

  • Topics related to durability of exchanges and queues
  • Durability of messages

Patterns and Use Cases

This guide focuses implementation of common messaging patterns using AMQP Model features as building blocks.

Error Handling and Recovery

This guide covers:

  • AMQP 0.9.1 protocol exceptions
  • How to deal with network failures
  • Other things that may go wrong

Using TLS (SSL) connections

This guide covers:

  • How to use TLS (SSL) connections to RabbitMQ with amqp gem

RabbitMQ Extensions

This guide covers RabbitMQ extensions and how they are used in amqp gem:

  • How to use Publishing Confirms with amqp gem
  • How to use exchange-to-exchange bindings
  • How to the alternate exchange extension
  • How to set per-queue message TTL
  • How to set per-message TTL
  • What are consumer cancellation notifications and how to use them
  • Message dead lettering and the dead letter exchange
  • How to use sender-selected routing (CC and BCC headers)

Troubleshooting your AMQP applications

Explains what to do when your AMQP applications using Ruby amqp gem and RabbitMQ misbehave.

amqp gem 0.8 migration guide

Learn how to migrate your amqp gem 0.6.x and 0.7.x applications to 0.8.0 and later and why you should do it.

Testing AMQP applications with Evented Spec

Learn about techniques of asynchronous testing for your messaging applications, and how to use Evented Spec.