[rabbitmq-discuss] reply_to header problems

Michael Klishin michael.s.klishin at gmail.com
Wed Nov 23 06:07:17 GMT 2011


2011/11/23 Paul Cowan <dagda1 at scotalt.net>

> The problem is that messages are not sent until the all the messages in
> the iteration have been published.
>
> That is after the iteration in the (0..5) loop has finished then all the
> messages are published.
>

amqp gem is event-driven and care needs to be taken to not block the event
loop. You can use EventMachine.defer
for processing of each message, then it will be executed in a thread pool.
Remember, however, that sharing channels between
threads is a no-no so you will have to use a separate channel for
publishing responses. It may potentially negate all the
benefits of publishing messages concurrently.
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111123/77a7d07a/attachment.htm>


More information about the rabbitmq-discuss mailing list