txAMQP.protocol.AMQPClient doesn't seem to support redirects or setting insist=True to avoid redirects.

Bug #531521 reported by Allan Bailey
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
txAMQP
Fix Released
Undecided
Allan Bailey

Bug Description

txAMQP.protocol.AMQPClient doesn't seem to support redirects or setting insist=True to avoid redirects.

I have an HA pair and have had cases where the client was hung not able to connect to the specified server
because it was (apparently) getting a redirect to the other server.

I cannot find anything in the code, version 0.3, where it seems to be handling the case of receiving a REDIRECT
and trying to connect to the other server.

Revision history for this message
Allan Bailey (zirpu) wrote :

here's a patch for 0.3 to add the insist option to the connection.

====
55c55
< def invoke(self, method, args, content = None):
---
> def invoke(self, method, args, content=None):
208c208
< def __init__(self, delegate, vhost, spec, heartbeat=0):
---
> def __init__(self, delegate, vhost, spec, heartbeat=0, insist=True):
216c216
<
---
> self.insist = insist
356c356
< yield channel0.connection_open(self.vhost)
---
> yield channel0.connection_open(self.vhost, insist=self.insist)
====

NOTE: I set insist=True for our internal application, but it should probably default to False.

Revision history for this message
Allan Bailey (zirpu) wrote :

Update: This works for me in production.

Revision history for this message
Dan Di Spaltro (dan-dispaltro) wrote :

I would actually like to see us implement the redirect, but that is more difficult.

Revision history for this message
Esteve Fernandez (esteve) wrote :

Fixed in rev 49. Thanks Allan!

Changed in txamqp:
assignee: nobody → Allan Bailey (zirpu)
status: New → Fix Committed
milestone: none → 0.4
Changed in txamqp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.