rabbitmq-tutorials/ruby
2011-05-19 10:29:01 +02:00
..
emit_log_direct.rb Ruby: new_task.rb, ARGV fix. 2011-05-03 04:14:32 +02:00
emit_log_topic.rb Ruby: new_task.rb, ARGV fix. 2011-05-03 04:14:32 +02:00
emit_log.rb Ruby: new_task.rb, ARGV fix. 2011-05-03 04:14:32 +02:00
new_task.rb Ruby: new_task.rb, ARGV fix. 2011-05-03 04:14:32 +02:00
README.md Amqp gem must be at least 0.8.0.rc12 2011-05-19 10:29:01 +02:00
receive_logs_direct.rb Ruby: receive_logs.rb, receive_logs_direct.rb and receive_logs_topic.rb. 2011-05-03 04:48:37 +02:00
receive_logs_topic.rb Ruby: receive_logs.rb, receive_logs_direct.rb and receive_logs_topic.rb. 2011-05-03 04:48:37 +02:00
receive_logs.rb Ruby: receive_logs.rb, receive_logs_direct.rb and receive_logs_topic.rb. 2011-05-03 04:48:37 +02:00
receive.rb Ruby: receive.rb 2011-05-03 04:30:15 +02:00
rpc_client.rb Ruby: RPC examples. 2011-05-03 11:19:53 +02:00
rpc_server.rb Ruby: RPC examples. 2011-05-03 11:19:53 +02:00
send.rb Prefer AMQP::Channel#default_exchange 2011-05-18 13:10:23 +04:00
worker.rb Whops, I forgot {:ack => true}. 2011-05-18 11:16:30 +02:00

Ruby code for RabbitMQ tutorials

Here you can find Ruby code examples from RabbitMQ tutorials.

Requirements

To run this code you need amqp gem version 0.8 (currently available as a prerelease version). This code won't work with earlier versions! You can install it via RubyGems thusly:

gem install amqp --pre --version "~> 0.8.0.rc12"

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.