main
1#!/usr/bin/env ruby
2## encoding: utf-8
3
4require "bunny"
5
6connection = Bunny.new
7connection.start
8
9channel = connection.create_channel
10exchange = channel.fanout("logs")
11message = ARGV.empty? ? "Hello World!" : ARGV.join(" ")
12exchange.publish(message)
13puts " [x] Sent #{message}"
14
15connection.close