summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2009-01-20 13:30:08 +0000
committerGordon Sim <gsim@apache.org>2009-01-20 13:30:08 +0000
commitf3287a51ca39d64b9cbc848b8db2c5a72fd2bdd6 (patch)
treef6ef68e7a65aa86f0d2a42f6a82eee2df9776100 /qpid/python
parentb4f77cd6a5ea505670a16d619717688e4f0ea43b (diff)
downloadqpid-python-f3287a51ca39d64b9cbc848b8db2c5a72fd2bdd6.tar.gz
QPID-1567: added 'exactly-once' guarantee to asynchronous replication of queue state
* altered replication protocol to detect and eliminate duplicates * added support for acknowledged transfer over inter-broker bridges * added option to qpid-route to control this git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@736018 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rwxr-xr-xqpid/python/commands/qpid-route10
1 files changed, 7 insertions, 3 deletions
diff --git a/qpid/python/commands/qpid-route b/qpid/python/commands/qpid-route
index e0e655683a..324ce2e176 100755
--- a/qpid/python/commands/qpid-route
+++ b/qpid/python/commands/qpid-route
@@ -48,6 +48,7 @@ def Usage():
print " -d [ --durable ] Added configuration shall be durable"
print " -e [ --del-empty-link ] Delete link after deleting last route on the link"
print " -s [ --src-local ] Make connection to source broker (push route)"
+ print " --ack N Acknowledge transfers over the bridge in batches of N"
print " -t <transport> [ --transport <transport>]"
print " Specify transport to use for links, defaults to tcp"
print
@@ -62,6 +63,7 @@ _durable = False
_dellink = False
_srclocal = False
_transport = "tcp"
+_ack = 0
class RouteManager:
def __init__(self, localBroker):
@@ -234,7 +236,7 @@ class RouteManager:
if _verbose:
print "Creating inter-broker binding..."
- res = link.bridge(_durable, exchange, exchange, routingKey, tag, excludes, False, _srclocal, dynamic)
+ res = link.bridge(_durable, exchange, exchange, routingKey, tag, excludes, False, _srclocal, dynamic, _ack)
if res.status != 0:
raise Exception(res.text)
if _verbose:
@@ -256,7 +258,7 @@ class RouteManager:
if _verbose:
print "Creating inter-broker binding..."
- res = link.bridge(_durable, queue, exchange, "", "", "", True, _srclocal, False)
+ res = link.bridge(_durable, queue, exchange, "", "", "", True, _srclocal, False, _ack)
if res.status != 0:
raise Exception(res.text)
if _verbose:
@@ -401,7 +403,7 @@ def YN(val):
##
try:
- longOpts = ("verbose", "quiet", "durable", "del-empty-link", "src-local", "transport=")
+ longOpts = ("verbose", "quiet", "durable", "del-empty-link", "src-local", "transport=", "ack=")
(optlist, encArgs) = getopt.gnu_getopt(sys.argv[1:], "vqdest:", longOpts)
except:
Usage()
@@ -425,6 +427,8 @@ for opt in optlist:
_srclocal = True
if opt[0] == "-t" or opt[0] == "--transport":
_transport = opt[1]
+ if opt[0] == "--ack":
+ _ack = int(opt[1])
nargs = len(cargs)
if nargs < 2: