main
1#!/env ruby
2# encoding: utf-8
3
4require "bunny"
5
6connection = Bunny.new
7connection.start
8
9channel = connection.create_channel
10queue = channel.queue("hello")
11
12channel.default_exchange.publish("hi", routing_key: queue.name)
13puts " [x] Send 'hi'"
14connection.close