Skip to content

Files

Latest commit

author
Michael Klishin
Jul 17, 2013
b5dd928 · Jul 17, 2013

History

History
This branch is 1120 commits behind rabbitmq/rabbitmq-tutorials:main.

ruby-amqp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013
Jul 17, 2013

Ruby (amqp gem) code for RabbitMQ tutorials

Here you can find Ruby code examples from RabbitMQ tutorials.

Requirements

If you use Microsoft Windows, we highly recommend you to use JRuby.

To run this code you need amqp gem.

You can install it via RubyGems. On Linux, Mac OS X and *BSD systems:

gem install amqp --version ">= 1.0.2"

On Windows:

jruby.exe --1.9 -S gem install amqp --version ">= 1.0.2"

Code

Tutorial one: "Hello World!":

ruby send.rb
ruby receive.rb

Tutorial two: Work Queues:

ruby new_task.rb
ruby worker.rb

Tutorial three: Publish/Subscribe

ruby receive_logs.rb
ruby emit_log.rb

Tutorial four: Routing

ruby receive_logs_direct.rb
ruby emit_log_direct.rb

Tutorial five: Topics

ruby receive_logs_topic.rb
ruby emit_log_topic.rb

Tutorial six: RPC

ruby rpc_server.rb
ruby rpc_client.rb

To learn more, visit Ruby AMQP gem documentation site.