Download the code:
git clone git://gist.github.com/791002.git amqp-demo-ruby
cd amqp-demo-ruby
Install the gems:
gem install amqp json ansi
Run the publisher:
ruby publisher.logs.rb
Run the consumer for all logs:
ruby consumer.logs.all.rb
Run the consumer for error level logs:
ruby consumer.logs.error.rb
Three initial messages are published to the log
exchange. Publish messages with:
info: HEY
debug: DEBUG
error: SOMETHING BAD HAPPENED