Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
..
Failed to load latest commit information.
README.md
emit_log.rb
emit_log_direct.rb Now that Bunny::Connection#close performs clean shutdowns, these can go
emit_log_topic.rb Now that Bunny::Connection#close performs clean shutdowns, these can go
new_task.rb Now that Bunny::Connection#close performs clean shutdowns, these can go
receive.rb Disable automatic connection recovery for Bunny tutorials
receive_logs.rb
receive_logs_direct.rb Disable automatic connection recovery for Bunny tutorials
receive_logs_topic.rb
rpc_client.rb Use condition variable to be notified of RPC responses
rpc_server.rb add missing puts
send.rb Now that Bunny::Connection#close performs clean shutdowns, these can go
worker.rb

README.md

Ruby code for RabbitMQ tutorials

Here you can find Ruby code examples from RabbitMQ tutorials.

Requirements

To run this code you need Bunny.

You can install it via RubyGems:

gem install bunny --version ">= 2.0.1"

Bunny supports Ruby 2.0 through 2.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 Bunny documentation site.

Something went wrong with that request. Please try again.