From d03ab78a2b5f1a36f8212289de42d3425ba3e7b2 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 30 Sep 2008 18:47:26 +0000 Subject: Added extra queue option git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@700546 13f79535-47bb-0310-9956-ffa450edef68 --- python/commands/qpid-config | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'python/commands') 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 () -- cgit v1.2.1