[rabbitmq-discuss] Getting RPC response from multiple rpc server

Alvaro Videla videlalvaro at gmail.com
Mon Mar 10 10:29:48 GMT 2014


Hi,

The problem seems to be in your rpc_client.py file.

In the line that says "while self.response is None:"

As soon as you get a reply, that will evaluate to True and then you
will miss the other reply.

If you are expecting more than one reply from the RPC server, then you
should keep the correlation ids in some sort of array/list/map.
Whatever is used in Python. Then you would match the correlation_id on
the incoming messages, with the correlation ids kept in the array.

Regards,

Alvaro





On Thu, Mar 6, 2014 at 11:09 PM, Mehmet Dursun Ince
<mehmet at mehmetince.net> wrote:
> Hi all
>
> I've been trying to do that getting response from multiple rpc server for
> one message. I solved send a broadcast RPC message via fanout exchange. Each
> rpc server gets message.
>
> For instance;
> when client send "1" only rpc_server.py returns. That's OKAY.
> when client send "2" only rpc_server2.py returns. That's OKAY too.
> But when client send "n" only first server returns. But i want to get
> response from both rpc server. i coded both server to send response for "n"
>
> i cant figure out that how can i solve my issue so i attached my source code
> and screenshot.
>
> i'm looking for some advice and tips from someone who tried to get message
> like me.
>
> PS: if i'm sending this message to wrong mailing list. i'm sorry.
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


More information about the rabbitmq-discuss mailing list