Skip to content

Instantly share code, notes, and snippets.

@pkieltyka
Created July 29, 2008 19:53
Show Gist options
  • Save pkieltyka/3159 to your computer and use it in GitHub Desktop.
Save pkieltyka/3159 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