summaryrefslogtreecommitdiff
path: root/qpid/python/commands/qpid-route
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-05-12 17:04:07 +0000
committerGordon Sim <gsim@apache.org>2008-05-12 17:04:07 +0000
commitb9622a65fdfc0846e620b4ef508488d75d6e6ee5 (patch)
treebf85db724b98b262376d9cb531f48289efce88f1 /qpid/python/commands/qpid-route
parent2241535ef63c1ff4de7c5738f1d85eca3786e7da (diff)
downloadqpid-python-b9622a65fdfc0846e620b4ef508488d75d6e6ee5.tar.gz
QPID-1050: Patch from Ted Ross:
1) Durability for federation links (broker-to-broker connections) 2) Improved handling of federation links: a) Links can be created even if the remote broker is not reachable b) If links are lost, re-establishment will occur using an exponential back-off algorithm 3) Durability of exchanges is now viewable through management 4) ManagementAgent API has been moved to an interface class to reduce coupling between the broker and manageable plug-ins. 5) General configuration storage capability has been added to the store/recover interface. This is used for federation links. 6) Management object-ids for durable objects are now themselves durable. (Note: some refactoring needed around ProtocolAccess needed to try and reduce dependencies) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@655563 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/commands/qpid-route')
-rwxr-xr-xqpid/python/commands/qpid-route18
1 files changed, 12 insertions, 6 deletions
diff --git a/qpid/python/commands/qpid-route b/qpid/python/commands/qpid-route
index baa45a320f..e59f89480e 100755
--- a/qpid/python/commands/qpid-route
+++ b/qpid/python/commands/qpid-route
@@ -83,7 +83,7 @@ class RouteManager:
def getLink (self):
links = self.mclient.syncGetObjects (self.mch, "link")
for link in links:
- if link.address == self.src.name ():
+ if "%s:%d" % (link.host, link.port) == self.src.name ():
return link
return None
@@ -100,8 +100,13 @@ class RouteManager:
print "Inter-broker link not found, creating..."
connectArgs = {}
- connectArgs["host"] = self.src.host
- connectArgs["port"] = self.src.port
+ connectArgs["host"] = self.src.host
+ connectArgs["port"] = self.src.port
+ connectArgs["useSsl"] = False
+ connectArgs["durable"] = False
+ connectArgs["authMechanism"] = "ANONYMOUS"
+ connectArgs["username"] = ""
+ connectArgs["password"] = ""
res = mc.syncCallMethod (self.mch, broker.id, broker.classKey, "connect", connectArgs)
if _verbose:
print "Connect method returned:", res.status, res.statusText
@@ -122,6 +127,7 @@ class RouteManager:
if _verbose:
print "Creating inter-broker binding..."
bridgeArgs = {}
+ bridgeArgs["durable"] = 0
bridgeArgs["src"] = exchange
bridgeArgs["dest"] = exchange
bridgeArgs["key"] = routingKey
@@ -180,7 +186,7 @@ class RouteManager:
myLink = link
break
if myLink != None:
- print "%s %s %s %s" % (self.dest.name(), myLink.address, bridge.dest, bridge.key)
+ print "%s %s:%d %s %s" % (self.dest.name(), myLink.host, myLink.port, bridge.dest, bridge.key)
def LoadRoutes (self, inFile):
pass
@@ -198,7 +204,7 @@ class RouteManager:
myLink = link
break
if myLink != None:
- print "Deleting Bridge: %s %s %s... " % (myLink.address, bridge.dest, bridge.key),
+ print "Deleting Bridge: %s:%d %s %s... " % (myLink.host, myLink.port, bridge.dest, bridge.key),
res = mc.syncCallMethod (self.mch, bridge.id, bridge.classKey, "close")
if res.status != 0:
print "Error: %d - %s" % (res.status, res.statusText)
@@ -208,7 +214,7 @@ class RouteManager:
links = mc.syncGetObjects (self.mch, "link")
for link in links:
if _verbose:
- print "Deleting Link: %s... " % link.address,
+ print "Deleting Link: %s:%d... " % (link.host, link.port),
res = mc.syncCallMethod (self.mch, link.id, link.classKey, "close")
if res.status != 0:
print "Error: %d - %s" % (res.status, res.statusText)