summaryrefslogtreecommitdiff
path: root/python/commands
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-09-30 18:47:26 +0000
committerGordon Sim <gsim@apache.org>2008-09-30 18:47:26 +0000
commitd03ab78a2b5f1a36f8212289de42d3425ba3e7b2 (patch)
treea08c437983325dd58195f8c0e13591bd6211f2b3 /python/commands
parent36c6fd0e309149de2ede18b7f6f1c11884c8ab13 (diff)
downloadqpid-python-d03ab78a2b5f1a36f8212289de42d3425ba3e7b2.tar.gz
Added extra queue option
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@700546 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/commands')
-rwxr-xr-xpython/commands/qpid-config10
1 files changed, 8 insertions, 2 deletions
diff --git a/python/commands/qpid-config b/python/commands/qpid-config
index 925b54b682..13b489abae 100755
--- a/python/commands/qpid-config
+++ b/python/commands/qpid-config
@@ -31,12 +31,13 @@ _fileCount = 8
_fileSize = 24
_maxQueueSize = None
_maxQueueCount= None
-
+_policyType = None
FILECOUNT = "qpid.file_count"
FILESIZE = "qpid.file_size"
MAX_QUEUE_SIZE = "qpid.max_size"
MAX_QUEUE_COUNT = "qpid.max_count"
+POLICY_TYPE = "qpid.policy_type"
def Usage ():
print "Usage: qpid-config [OPTIONS]"
@@ -61,6 +62,7 @@ def Usage ():
print " --file-size N (24) File size in pages (64Kib/page)"
print " --max-queue-size N Maximum in-memory queue size as bytes"
print " --max-queue-count N Maximum in-memory queue size as a number of messages"
+ print " --policy-type TYPE Action taken when queue limit is reached (reject, flow_to_disk, ring, ring_strict)"
print
print "Add Exchange Options:"
print " --durable Exchange is durable"
@@ -191,6 +193,8 @@ class BrokerManager:
declArgs[MAX_QUEUE_SIZE] = _maxQueueSize
if _maxQueueCount:
declArgs[MAX_QUEUE_COUNT] = _maxQueueCount
+ if _policyType:
+ declArgs[POLICY_TYPE] = _policyType
self.broker.getAmqpSession().queue_declare (queue=qname, durable=_durable, arguments=declArgs)
@@ -243,7 +247,7 @@ def YN (bool):
##
try:
- longOpts = ("durable", "bindings", "broker-addr=", "file-count=", "file-size=", "max-queue-size=", "max-queue-count=")
+ longOpts = ("durable", "bindings", "broker-addr=", "file-count=", "file-size=", "max-queue-size=", "max-queue-count=", "policy-type=")
(optlist, cargs) = getopt.gnu_getopt (sys.argv[1:], "a:b", longOpts)
except:
Usage ()
@@ -263,6 +267,8 @@ for opt in optlist:
_maxQueueSize = int (opt[1])
if opt[0] == "--max-queue-count":
_maxQueueCount = int (opt[1])
+ if opt[0] == "--policy-type":
+ _policyType = opt[1]
nargs = len (cargs)
bm = BrokerManager ()