Skip to content

Instantly share code, notes, and snippets.

@vagmi
Created September 19, 2010 11:38
Show Gist options
  • Save vagmi/586693 to your computer and use it in GitHub Desktop.
Save vagmi/586693 to your computer and use it in GitHub Desktop.
require 'mq'
AMQP.start :host=>"connectedhealth.in",:vhost=>"/test" do
def log(*args)
p [ Time.now, *args ]
end
mq = MQ.new
mq.queue("testphr").bind(MQ.direct("eprescription",:key=>"apollopharmacy")).subscribe { |msg|
log :received, msg
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment