rabbitmq-tutorials/ruby
Michael Klishin 6be7cfebf9
Bunny: warn against subscribe(block: true)
It was never meant to be used outside of tutorials
but unfortunately some do just that.
2019-02-27 04:38:02 +03:00
..
emit_log_direct.rb Update ruby tutorial four 2018-02-19 17:08:22 -03:00
emit_log_topic.rb Update ruby tutorial five 2018-02-19 17:08:22 -03:00
emit_log.rb Update ruby tutorial three 2018-02-19 17:08:22 -03:00
Gemfile Require Bunny 2.12+ 2018-10-02 01:46:13 +03:00
Gemfile.lock Require Bunny 2.12+ 2018-10-02 01:46:13 +03:00
new_task.rb Update ruby tutorial two 2018-02-19 17:08:22 -03:00
README.md Update README.md 2019-01-07 11:59:18 +09:00
receive_logs_direct.rb Bunny: warn against subscribe(block: true) 2019-02-27 04:38:02 +03:00
receive_logs_topic.rb Bunny: warn against subscribe(block: true) 2019-02-27 04:38:02 +03:00
receive_logs.rb Bunny: warn against subscribe(block: true) 2019-02-27 04:38:02 +03:00
receive.rb Bunny: warn against subscribe(block: true) 2019-02-27 04:38:02 +03:00
rpc_client.rb Update ruby tutorial six 2018-02-19 18:01:24 -03:00
rpc_server.rb Bunny: warn against subscribe(block: true) 2019-02-27 04:38:02 +03:00
send.rb Update ruby tutorial one 2018-02-19 17:08:22 -03:00
worker.rb Bunny: warn against subscribe(block: true) 2019-02-27 04:38:02 +03:00

Ruby code for RabbitMQ tutorials

Here you can find Ruby code examples from RabbitMQ tutorials.

Requirements

These tutorials require Ruby 2.2 or later, Bundler and Bunny to be installed.

To install Bunny with Bundler, do

bundle install

Code

To run tutorial one: "Hello World!":

bundle exec ruby send.rb
bundle exec ruby receive.rb

Tutorial two: Work Queues:

bundle exec ruby new_task.rb
bundle exec ruby worker.rb

Tutorial three: Publish/Subscribe

bundle exec ruby receive_logs.rb
bundle exec ruby emit_log.rb

Tutorial four: Routing

bundle exec ruby receive_logs_direct.rb
bundle exec ruby emit_log_direct.rb

Tutorial five: Topics

bundle exec ruby receive_logs_topic.rb
bundle exec ruby emit_log_topic.rb

Tutorial six: RPC

bundle exec ruby rpc_server.rb
bundle exec ruby rpc_client.rb

To learn more, see Bunny documentation.