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

Christopher Lefevre CLefevre at Transparent.com
Tue Sep 6 15:52:17 BST 2011


Here is the very basic publish, and then basic consume with a new queue.

def _on_queue_declared(self, frame):
        self.StrReturn_Message = None

        self.channel.basic_publish(exchange='',
                            routing_key=self.routing_key,
                            body=self.message,
                            properties = pika.BasicProperties(
                                content_type=self.content_type,
                                delivery_mode=self.delivery_mode,
                                reply_to = self.reply_to,
                                correlation_id = self.correlationID
                            )
        )
        self.channel.basic_consume(self._return_stack, queue=self.reply_to)


-Christopher Lefevre

From: Michael Klishin [mailto:michael.s.klishin at gmail.com]
Sent: Tuesday, September 06, 2011 9:38 AM
To: Christopher Lefevre
Cc: 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?

2011/9/6 Christopher Lefevre <CLefevre at transparent.com<mailto:CLefevre at transparent.com>>
Though I also wanted it to be non-blocking so the website isn’t stuck waiting for the reply, but rather can be updated as needed. Currently, I can get it to work if there is a pause, like when stepping through the program in a debugger, but when it runs without myself stepping through, it simply hangs when the queue is created and the message is never picked up.

Please post a code example that is at least similar to your actual code.

--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110906/47908329/attachment.htm>


More information about the rabbitmq-discuss mailing list