[rabbitmq-discuss] Using rabbitmq-http2 (was: simple.publish over the JSON RPC interface)

Nathan Gray n8gray at n8gray.org
Thu Aug 6 06:53:40 BST 2009

Hi Cuong,

On Wed, Aug 5, 2009 at 9:36 PM, Cuong Le<cuonglb at facemain.com> wrote:
> Hi Nathan,
> because you're using json_rpc synchronous requests - call, you must
> keep-alive it with steps 5s/request.
> It think you have to set : session timeout = 5s (gen_server:call default
> time out is 5000ms).
> resp = proxy.rpccall("/rpc/rabbitmq", "open", ["guest", "guest",5,"/"])

Ah, thank you!  This is progress!  But I'm now quite confused about
what this session timeout really means.  Shouldn't "poll" just return
instantly?  Why does it wait for the session to timeout?

If I replace the call to poll with channel.declare, then a session
timeout of 5s gives me the gen_server timeout error again.  If I set
the session timeout to something less than 5s I get this response:


And again, I'm not sure why it waits for the session timeout to expire
before replying.  Here's the code that I put in to replace the poll
rpc call:

resp = proxy.rpccall(url, "call", ["exchange.declare",
                                   [0,           #ticket
                                    "foobar",   #exchange name
                                    "fanout",    #exch type
                                    False,       #passive
                                    True,        #durable
                                    False,       #auto-delete
                                    False,       #internal
                                    True,        #nowait
                                    []           #exchange arguments

Thanks again,


More information about the rabbitmq-discuss mailing list