[rabbitmq-discuss] Multiple enqueued RPC methods and ShutdownSignalExceptions and simulating ConnectionTimeouts

Daniel McGreal daniel at redbite.com
Mon Feb 24 22:32:43 GMT 2014


Hi RabbitMQ Discuss,

I have a problem with my client application, using the 3.2.2 Java library. 

Multiple calls made to 'RPC’ methods, such as exchangeDeclare block (interminably) if the call is made while the connection is down, but before it times out.

From my basic understanding, it looks like AMQChannel blocks incoming ‘RPC’ methods using .wait in enqueueRpc. When a ShutdownSignalException comes in via processShutdownSignal, it clears only one of the ‘next’ RPC calls waiting because, even though notifyAll is used, the while loop containing the .wait will only be cleared by one of the incoming threads?

This situation is only apparent for my application during a ConnectionTimeout, which I haven’t been able to simulate in a controlled manner. For testing connection failures, I use a script which makes and breaks a proxy to the real server (mkfifo backpipe && nc -l 5672 < backpipe | nc realserver 5672 > backpipe), but this results in immediate connection failure which is not (so) susceptible to this problem as the exchangeDeclares are rejected before blocking. I wonder if anyone has a method for simulating connection timeouts?

Very best, Dan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140224/42a0a129/attachment.html>


More information about the rabbitmq-discuss mailing list