.. | ||
emit_log_direct.rb | ||
emit_log_topic.rb | ||
emit_log.rb | ||
new_task.rb | ||
README.md | ||
receive_logs_direct.rb | ||
receive_logs_topic.rb | ||
receive_logs.rb | ||
receive.rb | ||
rpc_client.rb | ||
rpc_server.rb | ||
send.rb | ||
worker.rb |
Ruby 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. It is 1.9.2-compatible since 1.6.0.
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. On Linux, Mac OS X and *BSD systems:
gem install amqp --pre --version "~> 0.8.0.rc12"
On Windows:
jruby.exe --1.9 -S gem install amqp --pre --version "~> 0.8.0.rc12"
Code
ruby send.rb
ruby receive.rb
ruby new_task.rb
ruby worker.rb
Tutorial three: Publish/Subscribe
ruby receive_logs.rb
ruby emit_log.rb
ruby receive_logs_direct.rb
ruby emit_log_direct.rb
ruby receive_logs_topic.rb
ruby emit_log_topic.rb
ruby rpc_server.rb
ruby rpc_client.rb
To learn more, visit Ruby AMQP gem documentation site.