Skip to content

Instantly share code, notes, and snippets.

@tmm1
Forked from pkieltyka/gist:3159
Created July 29, 2008 20:03
Show Gist options
  • Save tmm1/3162 to your computer and use it in GitHub Desktop.
Save tmm1/3162 to your computer and use it in GitHub Desktop.
#require 'rubygems'
require 'amqp/lib/mq'
EM.run do
def log(*args)
p args
end
# AMQP.logging = true
amq = MQ.new
world1 = amq.direct("world1")
amq.queue("pat-serv", :auto_delete => true).bind(world1).subscribe do |msg|
log :recv, msg
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment