[rabbitmq-discuss] Publish on a queue, then Monitor on a reply queue, with only 1 connection to the RabbitMQ server? Non-blocking?

Gavin M. Roy gmr at myyearbook.com
Wed Sep 7 19:38:00 BST 2011


 You can have multiple connections with one IO loop, assuming you're using PIka. In that case, the IOloop is a single instance across all connections, so you should setup both your connections before starting it, or use a timer to call a method after starting it that sets up your connections.

Gavin 


On Wednesday, September 7, 2011 at 2:02 PM, Christopher Lefevre wrote:

> EXACTLY!
> 
> That's the bit that I'm getting stuck on.
> 
> I have a publish method that sets up a connection, then calls another function to open a channel, then publishes to the queue as shown previously.
> 
> Within that function is a connection.ioloop.start() which I guess I don't really understand. For the individual publish/monitor functions they work as expected, the monitor will monitor and consume, while the publish only publishes once and breaks the ioloop, as expected.
> 
> To get an asynchronous Publish, then Monitor the reply_to queue, I can instantiate the classes for the monitor/publisher I have, and it will work with 2 connections to the server. However trying to get this done with one connection is where I'm balking.
> 
> -Christopher Lefevre
> 
> 
> -----Original Message-----
> From: Marek Majkowski [mailto:majek04 at gmail.com]
> Sent: Wednesday, September 07, 2011 11:45 AM
> To: Christopher Lefevre
> Cc: rabbitmq-discuss at lists.rabbitmq.com (mailto:rabbitmq-discuss at lists.rabbitmq.com)
> Subject: Re: [rabbitmq-discuss] Publish on a queue, then Monitor on a reply queue, with only 1 connection to the RabbitMQ server? Non-blocking?
> 
> On Wed, Sep 7, 2011 at 14:21, Christopher Lefevre
> <CLefevre at transparent.com (mailto:CLefevre at transparent.com)> wrote:
> > Coming back to this after a day I realize throughout I was a bit off in describing my situation. I am actually attempting to get an asynchronous setup to work on one connection to the RabbitMQ server.
> > 
> > Connect, create a channel(s), publish to a queue, then monitor on the reply queue, in an asynchronous state, returning the reply to a web page when completed.
> 
> Well, if you want to use asynchronous style, than you need to have
> an event loop and program using callbacks.
> 
> Cheers,
>  Marek
> The information contained in this electronic message and any attached document(s) is intended only for the personal and confidential use of the designated recipients named above. This message may be confidential. If the reader of this message is not the intended recipient, you are hereby notified that you have received this document in error, and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify sender immediately by telephone (603) 262-6300 or by electronic mail immediately. Thank you.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com (mailto:rabbitmq-discuss at lists.rabbitmq.com)
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110907/195ec288/attachment.htm>


More information about the rabbitmq-discuss mailing list