[rabbitmq-discuss] RPC response/reply for RabbitMQ - Timeouts
Laing, Michael P.
Michael.Laing at nytimes.com
Tue Jun 11 20:35:35 BST 2013
Just use pika's Connection.add_timeout method with a callback.
From: Chris <stuff at moesel.net<mailto:stuff at moesel.net>>
Reply-To: rabbitmq <rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>>
Date: Tuesday, June 11, 2013 12:31 PM
To: rabbitmq <rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>>
Cc: "rabbitmq-discuss at googlegroups.com<mailto:rabbitmq-discuss at googlegroups.com>" <rabbitmq-discuss at googlegroups.com<mailto:rabbitmq-discuss at googlegroups.com>>
Subject: Re: [rabbitmq-discuss] RPC response/reply for RabbitMQ - Timeouts
If you do figure out how to use client timeouts, you may also want to consider using per-message TTL if you don't care about the message anymore after a timeout. This can save unnecessary processing of messages that no longer have an interested participant. On the other hand, if you want the message processed, even after the client times out, then you better not do this.
On Tue, Jun 11, 2013 at 11:41 AM, Tim Watson <tim at rabbitmq.com<mailto:tim at rabbitmq.com>> wrote:
On 11 Jun 2013, at 01:53, JayD wrote:
All information is old that I have seen on this. Is there yet a way to define a client side timeout on an rpc style call. I find it hard to believe that one would have to leave the request hanging if the server is not up and running.
Does anyone have a good solution for this at this point in time? On the client side I am using pika.
This kind of problem is generally solved using threads, or some kind of non-blocking I/O event loop. I have no idea how Pika does it - I think it depends on which kind of consumer you've set up - but I'd suggest you try asking on the pika mailing list - https://groups.google.com/forum/#!forum/pika-python<https://groups.google.com/forum/#%21forum/pika-python>.
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com<mailto:rabbitmq-discuss at lists.rabbitmq.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss