[rabbitmq-discuss] How to define a timeout on jsonRpcClient calls

Emile Joubert emile at rabbitmq.com
Wed Mar 30 14:55:09 BST 2011


On 30/03/11 14:28, mysurf mail wrote:
> Hi All,
> Still regarding the JsonRpc
> 1. I would also love to control the  json rpc channel properties -
> mainly autodelete.

The RpcClient already creates autodelete queues. See the 
RpcClient.setupReplyQueue() method.

> You see, the queues of JSONRpcClient are not deleted when the client go of.
> and since they clients queue name is randomly given, the queues are
> packed each restart.

The queues contain RPC replies are autodelete queues and should 
disappear when no longer required. If they are not being deleted then 
the associated consumer is probably still connected. You can use the 
"rabbitmqctl list_consumers" command to confirm.

> 2. in the example = client server constructor
> HelloJSonClient - jsonrpc client gets Hello in the routing key
> HelloJsonServer - jsonrpc server gets Hello in the queuename
> Why should the routing key in the client be assigned? where is the
> connection between the two?
> Shouldn't it be autogenereated like the queue name in the client side?
> thanks.

In the example, the "Hello" queue is created by the server. The server 
listens for requests in this queue. It is possible to use a 
server-generated queue name, but that would demand that the server 
communicates the random name to the client by some other means before 
they can exchange information. It is more convenient for the client and 
server to agree on a name beforehand and use that.



More information about the rabbitmq-discuss mailing list