Sridhar,<br><br>Can you describe how this doesn't work?<br><br>Paul.<br><br><div class="gmail_quote">On Wed, Sep 9, 2009 at 8:46 AM, Sridhar Raman <span dir="ltr"><<a href="mailto:sridhar.raman@gmail.com">sridhar.raman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi<br><br>This is our current setup that is working in a server:<br>Listener (that receives the data and publishes it):<br>
<b>module QueueData<br> def receive_data(d)<br> $amq.queue("queue_name").publish(d)<br>
end<br>end<div><br>EM.run {<br> $amq = MQ.new<br></div> EM.start_server "0.0.0.0", 22003, QueueData <br>}</b><br><br>Processor (that subscribes to the queue and processes it):<br><b>EM.run { <br>
amq = MQ.new<br>
amq.queue("queue_name").subscribe { |d|<br> puts d <br> }<br>}</b><br><br>How do I subscribe to this queue from another machine? I tried this:<br><b>AMQP.start(:host => 'hostname', :port => 5672, :logging => true) do<br>
puts "connected ..."<br> mq = MQ.new<br> MQ.queue('queue_name').subscribe{ |msg|<br> puts msg<br> }<br>end</b><br><br>But it doesn't work. Any suggestions?<br>
<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br>