Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # == RabbitMQ Subscriber
- require 'rubygems'
- require 'mq'
- AMQP.start(:host => 'dev.rabbitmq.com') do
- MQ.queue("notifications").bind( MQ.topic('notifications'), :key => "notifications.*").subscribe do |header, body|
- puts "Received message:"
- p header
- p body
- end
- end
Add Comment
Please, Sign In to add comment