RPC with multiple servers and concurrent access

213 views
Skip to first unread message

catharsis3k

unread,
Sep 6, 2018, 3:20:00 AM9/6/18
to rabbitmq-users
I have built an RPC client-server application using AMQP php library. Are there any design best practices when running multiple back-end servers and concurrent client access ?

For example, on this page: https://www.rabbitmq.com/tutorials/tutorial-six-php.html , it says to declare the queue as exclusive but if I do that, concurrent access is no longer possible.

I got around that by creating unique call-back queues, like this:
$callback_queue = 'command_result_queue_' . uniqid();

However, even this way, seemingly at random, under high volume some messages get lost and I get hit with a timeout error: "PHP Fatal error:  Uncaught exception 'PhpAmqpLib\Exception\AMQPTimeoutException' with message 'The connection timed out after 45 sec while awaiting incoming data"

I'm guessing there's something in particular about concurrent access to multiple RPC servers that's causing this issue but I can't put my finger on it.

To debug I've setup an AE to try and catch unroutable messages but it didn't catch anything. I've also enabled tracing but it's not telling me much either.

catharsis3k

unread,
Sep 6, 2018, 5:38:29 PM9/6/18
to rabbitmq-users
I guess what I'm asking is, for concurrent access, do I need to setup separate exchanges, one for each server and the clients connect to them at random ? Do I also need separate queues ?
Reply all
Reply to author
Forward
0 new messages