public final class QpidCtrl extends Object
Usage: QpidCtrl [options] command [args]
The args need to be in a Stringified Map format (similar to an Address String)
e.g. to set broker log level: QpidCtrl setLogLevel "{level:\"debug+:Broker\"}"
The listValues command lists property names and values of the specified object.
The listObjects command lists all objects of the specified package and class.
Options:
-h, --help show this help message and exit
-v enable logging
-a <address>, --broker-address=<address>
broker-addr is in the form: [username/password@]
hostname | ip-address [:<port>] ex: localhost,
10.1.1.7:10000, broker-host:10000,
guest/guest@localhost
-c <class>, --class=<class>
class of object on which command is being invoked
(default broker)
-p <package>, --package=<package>
package of object on which command is being invoked
(default org.apache.qpid.broker)
-i <id>, --id=<id> identifier of object on which command is being invoked
(default amqp-broker)
--agent=<agent name>
The name of the Agent to which commands will be sent
This will try to match <agent name> against the Agent name
the Agent product name and will also check if the Agent name
contains the <agent name> String
(default qpidd)
--sasl-mechanism=<mech>
SASL mechanism for authentication (e.g. EXTERNAL,
ANONYMOUS, PLAIN, CRAM-MD5, DIGEST-MD5, GSSAPI). SASL
automatically picks the most secure available
mechanism - use this option to override.
Examples (Note the quotes and escaped quotes are significant!):
Get the current broker log level:
QpidCtrl getLogLevelSet the current broker log level to notice+:
QpidCtrl setLogLevel "{level:\"notice+\"}"
Set the current broker log level to debug+ for all Management Objects:
QpidCtrl setLogLevel "{level:\"debug+\"}"
Set the current broker log level to debug+ for just the Broker Management Object:
QpidCtrl setLogLevel "{level:\"debug+:Broker\"}"
List the properties of the qmf.default.direct exchange:
QpidCtrl -c exchange -i qmf.default.direct listValuesCreate a queue called test with a flow-to-disk limit policy:
QpidCtrl create "{type:queue,name:test,properties:{'qpid.policy_type':ring}}"
Delete a queue called test:
QpidCtrl delete "{type:queue,name:test}"
Create a binding called bind1 between the amq.match exchange and the test queue matching the headers name=fadams
and gender=male:
QpidCtrl create "{type:binding,name:'amq.match/test/bind1',properties:{x-match:all,name:fadams,gender:male}}"
Delete the binding called bind1 between the amq.match exchange and the test queue:
QpidCtrl delete "{type:binding,name:'amq.match/test/bind1'}"
Get the broker to echo a message:
QpidCtrl echo "{sequence:1234,body:'Peaches En Regalia'}"
Invoke the event method on the gizmo Agent (launch gizmo Agent via AgentTest):
QpidCtrl -p com.profitron.gizmo -c control -i OPERATIONAL --agent=gizmo eventInvoke the create_child method on the gizmo Agent (launch gizmo Agent via AgentTest):
QpidCtrl -p com.profitron.gizmo -c control -i OPERATIONAL --agent=gizmo create_child "{name:monkeyBoy}"
Invoke the stop method on the gizmo Agent (launch gizmo Agent via AgentTest):
QpidCtrl -p com.profitron.gizmo -c control -i OPERATIONAL --agent=gizmo stop "{message:'Will I dream?'}"public QpidCtrl(String url, String connectionOptions, String pkg, String cls, String id, String agentName, String command, String args)
url - the Connection URL.connectionOptions - the connection options String to pass to ConnectionHelper.pkg - the package name of the object we're invoking the method on.cls - the class name of the object we're invoking the method on.id - the ObjectId name of the object we're invoking the method on.agentName - the name of the Agent to invoke the QMF method on.command - the QMF method we're invoking.args - the Stringified Map form of the method arguments.public static void main(String[] args)
args - the command line arguments.Copyright © 2006–2014 The Apache Software Foundation. All rights reserved.