It's vaguely pointless, as the python qpid-config is the "canonical" qpid-config :-) Nonetheless, it's a useful intellectual exercise to illustrate using QMF2 from Java.
QpidConfig (unlike the python qpid-config) uses pure QMF2 for adding/deleting queues, exchanges & bindings this provides useful illustration of how to do these things using the ManagementAgent method calls.
N.B. "create" and "delete" broker ManagementAgent methods were added in Qpid version 0.10, unfortunately these calls won't work for earlier versions of Qpid.
Usage: qpid-config [OPTIONS] qpid-config [OPTIONS] exchanges [filter-string] qpid-config [OPTIONS] queues [filter-string] qpid-config [OPTIONS] add exchange <type> <name> [AddExchangeOptions] qpid-config [OPTIONS] del exchange <name> qpid-config [OPTIONS] add queue <name> [AddQueueOptions] qpid-config [OPTIONS] del queue <name> [DelQueueOptions] qpid-config [OPTIONS] bind <exchange-name> <queue-name> [binding-key] <for type xml> [-f -|filename] <for type header> [all|any] k1=v1 [, k2=v2...] qpid-config [OPTIONS] unbind <exchange-name> <queue-name> [binding-key] ADDRESS syntax: [username/password@] hostname ip-address [:<port>] Examples: $ qpid-config add queue q $ qpid-config add exchange direct d localhost:5672 $ qpid-config exchanges 10.1.1.7:10000 $ qpid-config queues guest/guest@broker-host:10000 Add Exchange <type> values: direct Direct exchange for point-to-point communication fanout Fanout exchange for broadcast communication topic Topic exchange that routes messages using binding keys with wildcards headers Headers exchange that matches header fields against the binding keys xml XML Exchange - allows content filtering using an XQuery Queue Limit Actions none (default) - Use broker's default policy reject - Reject enqueued messages flow-to-disk - Page messages to disk ring - Replace oldest unacquired message with new ring-strict - Replace oldest message, reject if oldest is acquired Queue Ordering Policies fifo (default) - First in, first out lvq - Last Value Queue ordering, allows queue browsing lvq-no-browse - Last Value Queue ordering, browsing clients may lose data Options: -h, --help show this help message and exit General Options: -t <secs>, --timeout=<secs> Maximum time to wait for broker connection (in seconds) -b, --bindings Show bindings in queue or exchange list -a <address>, --broker-addr=<address> Maximum time to wait for broker connection (in seconds) --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. Options for Adding Exchanges and Queues: --alternate-exchange=<aexname> Name of the alternate-exchange for the new queue or exchange. Exchanges route messages to the alternate exchange if they are unable to route them elsewhere. Queues route messages to the alternate exchange if they are rejected by a subscriber or orphaned by queue deletion. --passive, --dry-run Do not actually add the exchange or queue, ensure that all parameters and permissions are correct and would allow it to be created. --durable The new queue or exchange is durable. Options for Adding Queues: --file-count=<n> Number of files in queue's persistence journal --file-size=<n> File size in pages (64Kib/page) --max-queue-size=<n> Maximum in-memory queue size as bytes --max-queue-count=<n> Maximum in-memory queue size as a number of messages --limit-policy=<policy> Action to take when queue limit is reached --order=<ordering> Queue ordering policy --generate-queue-events=<n> If set to 1, every enqueue will generate an event that can be processed by registered listeners (e.g. for replication). If set to 2, events will be generated for enqueues and dequeues. --flow-stop-size=<n> Turn on sender flow control when the number of queued bytes exceeds this value. --flow-resume-size=<n> Turn off sender flow control when the number of queued bytes drops below this value. --flow-stop-count=<n> Turn on sender flow control when the number of queued messages exceeds this value. --flow-resume-count=<n> Turn off sender flow control when the number of queued messages drops below this value. --argument=<NAME=VALUE> Specify a key-value pair to add to queue arguments Options for Adding Exchanges: --sequence Exchange will insert a 'qpid.msg_sequence' field in the message header --ive Exchange will behave as an 'initial-value-exchange', keeping a reference to the last message forwarded and enqueuing that message to newly bound queues. Options for Deleting Queues: --force Force delete of queue even if it's currently used or it's not empty --force-if-not-empty Force delete of queue even if it's not empty --force-if-not-used Force delete of queue even if it's currently used Options for Declaring Bindings: -f <file.xq>, --file=<file.xq> For XML Exchange bindings - specifies the name of a file containing an XQuery.@author Fraser Adams
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|