summaryrefslogtreecommitdiff
path: root/content/xdocs/MgmtC++.html
diff options
context:
space:
mode:
Diffstat (limited to 'content/xdocs/MgmtC++.html')
-rwxr-xr-xcontent/xdocs/MgmtC++.html333
1 files changed, 333 insertions, 0 deletions
diff --git a/content/xdocs/MgmtC++.html b/content/xdocs/MgmtC++.html
new file mode 100755
index 0000000000..9aae04d028
--- /dev/null
+++ b/content/xdocs/MgmtC++.html
@@ -0,0 +1,333 @@
+<html>
+ <head>
+ <title>Apache Qpid : MgmtC++</title>
+ <link rel="stylesheet" href="styles/site.css" type="text/css" />
+ <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ </head>
+
+ <body>
+ <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
+ <tr>
+ <td valign="top" class="pagebody">
+ <div class="pageheader">
+ <span class="pagetitle">
+ Apache Qpid : MgmtC++
+ </span>
+ </div>
+ <div class="pagesubheading">
+ This page last changed on Apr 15, 2008 by <font color="#0050B2">cctrieloff</font>.
+ </div>
+
+ <h2><a name="MgmtC%2B%2B-ManagingtheC%5CBroker"></a>Managing the C+&#43; Broker</h2>
+
+<p>There are quite a few ways to interact with the C+&#43; broker. The command line tools<br/>
+include:</p>
+<ul>
+ <li>qpid-route - used to configure federation (a set of federated brokers)</li>
+ <li>qpid-config - used to configure queues, exchanges, bindings and list them etc</li>
+ <li>qpid-tool - used to view management information/statistics and call any management actions on the broker</li>
+</ul>
+
+
+<h3><a name="MgmtC%2B%2B-Usingqpidconfig"></a>Using qpid-config</h3>
+
+<p>This utility can be used to create queues exchanges and bindings, both durable and transient. Always check for latest options by running &#45;-help command.</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">$ ./qpid-config --help
+Usage: qpid-config OPTIONS
+ qpid-config OPTIONS exchanges filter-string
+ qpid-config OPTIONS queues filter-string
+ qpid-config OPTIONS add exchange &lt;type&gt; &lt;name&gt; AddExchangeOptions
+ qpid-config OPTIONS del exchange &lt;name&gt;
+ qpid-config OPTIONS add queue &lt;name&gt; AddQueueOptions
+ qpid-config OPTIONS del queue &lt;name&gt;
+ qpid-config OPTIONS bind &lt;exchange-name&gt; &lt;queue-name&gt; binding-key
+ qpid-config OPTIONS unbind &lt;exchange-name&gt; &lt;queue-name&gt; binding-key
+Options:
+ -b [ --bindings ] Show bindings in queue or exchange list
+ -a [ --broker-addr ] Address (localhost) Address of qpidd broker
+ broker-addr is in the form: hostname | ip-address :&lt;port&gt;
+ ex: localhost, 10.1.1.7:10000, broker-host:10000
+ -s [ --spec-file] Path (/usr/share/amqp/amqp.0-10-preview.xml)
+ AMQP specification file
+Add Queue Options:
+ --durable Queue is durable
+
+Add Exchange Options:
+ --durable Exchange is durable</pre>
+</div></div>
+<p>Get the summary page</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">./qpid-config
+Total Exchanges: 6
+ topic: 2
+ headers: 1
+ fanout: 1
+ direct: 2
+ Total Queues: 7
+ durable: 0
+ non-durable: 7</pre>
+</div></div>
+<p>List the queues</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">$ ./qpid-config queues
+ Store Size
+Durable AutoDel Excl Bindings (files x file pages) Queue Name
+===========================================================================================
+ N N N 1 pub_start
+ N N N 1 pub_done
+ N N N 1 sub_ready
+ N N N 1 sub_done
+ N N N 1 perftest0
+ N Y N 2 mgmt-3206ff16-fb29-4a30-82ea-e76f50dd7d15
+ N Y N 2 repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15
+ N Y N 2 mgmt-df06c7a6-4ce7-426a-9f66-da91a2a6a837
+ N Y N 2 repl-df06c7a6-4ce7-426a-9f66-da91a2a6a837</pre>
+</div></div>
+<p>List the exchanges with bindings</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">$ ./qpid-config -b exchanges
+Exchange '' (direct)
+ bind pub_start =&gt; pub_start
+ bind pub_done =&gt; pub_done
+ bind sub_ready =&gt; sub_ready
+ bind sub_done =&gt; sub_done
+ bind perftest0 =&gt; perftest0
+ bind mgmt-3206ff16-fb29-4a30-82ea-e76f50dd7d15 =&gt; mgmt-3206ff16-fb29-4a30-82ea-e76f50dd7d15
+ bind repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15 =&gt; repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15
+Exchange 'amq.direct' (direct)
+ bind repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15 =&gt; repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15
+ bind repl-df06c7a6-4ce7-426a-9f66-da91a2a6a837 =&gt; repl-df06c7a6-4ce7-426a-9f66-da91a2a6a837
+ bind repl-c55915c2-2fda-43ee-9410-b1c1cbb3e4ae =&gt; repl-c55915c2-2fda-43ee-9410-b1c1cbb3e4ae
+Exchange 'amq.topic' (topic)
+Exchange 'amq.fanout' (fanout)
+Exchange 'amq.match' (headers)
+Exchange 'qpid.management' (topic)
+ bind mgmt.# =&gt; mgmt-3206ff16-fb29-4a30-82ea-e76f50dd7d15</pre>
+</div></div>
+
+<h3><a name="MgmtC%2B%2B-Usingqpidroute"></a>Using qpid-route</h3>
+
+<p>This utility is to create federated networks of brokers, This allows you for forward messages between brokers in a network. Think of it like an IP network and static routes are configured with direct exchanges, and dynamic routes configured with the topic exchanges. The '*' and '#' can be used to create IP masking type pattern as you would with IP address except you are using the topic names.</p>
+
+<p>The utility thus looks much like iproute <img class="emoticon" src="./icons/emoticons/smile.gif" height="20" width="20" align="absmiddle" alt="" border="0"/></p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">$ ./qpid-route --help
+Usage: qpid-route OPTIONS add &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt; &lt;routing-key&gt;
+ qpid-route OPTIONS del &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt; &lt;routing-key&gt;
+ qpid-route OPTIONS list &lt;dest-broker&gt;
+ qpid-route OPTIONS flush &lt;dest-broker&gt;
+Options:
+ -s [ --spec-file ] PATH (/usr/share/amqp/amqp.0-10.xml)
+ -v [ --verbose ] Verbose output
+ -q [ --quiet ] Quiet output, don't print duplicate warnings
+ dest-broker and src-broker are in the form: hostname | ip-address :&lt;port&gt;
+ ex: localhost, 10.1.1.7:10000, broker-host:10000</pre>
+</div></div>
+<p>A few examples:</p>
+<div class="code"><div class="codeContent">
+<pre class="code-java">./qpidd_route -v add host1 host2 hub1.topic hub2.topic.stock.buy
+./qpidd_route -v add host1 host2 hub1.topic hub2.topic.stock.sell
+./qpidd_route -v add host1 host2 hub1.topic 'hub2.topic.stock.#'
+./qpidd_route -v add host1 host2 hub1.topic 'hub2.#'
+./qpidd_route -v add host1 host2 hub1.topic 'hub2.topic.#'
+./qpidd_route -v add host1 host2 hub1.topic 'hub2.global.#'</pre>
+</div></div>
+
+<h3><a name="MgmtC%2B%2B-Usingqpidtool"></a>Using qpid-tool</h3>
+
+<p>This utility provided a telnet style interface to be able to view, list all stats and action<br/>
+all the methods. Simple capture below. Best to just play with it and mail the list if you have<br/>
+questions or want features added.</p>
+
+<div class="code"><div class="codeContent">
+<pre class="code-java">qpid:
+qpid: help
+Management Tool <span class="code-keyword">for</span> QPID
+Commands:
+ list - Print summary of existing objects by class
+ list &lt;className&gt; - Print list of objects of the specified class
+ list &lt;className&gt; all - Print contents of all objects of specified class
+ list &lt;className&gt; active - Print contents of all non-deleted objects of specified class
+ list &lt;list-of-IDs&gt; - Print contents of one or more objects (infer className)
+ list &lt;className&gt; &lt;list-of-IDs&gt; - Print contents of one or more objects
+ list is space-separated, ranges may be specified (i.e. 1004-1010)
+ call &lt;ID&gt; &lt;methodName&gt; &lt;args&gt; - Invoke a method on an object
+ schema - Print summary of object classes seen on the target
+ schema &lt;className&gt; - Print details of an object class
+ set time-format <span class="code-object">short</span> - Select <span class="code-object">short</span> timestamp format (<span class="code-keyword">default</span>)
+ set time-format <span class="code-object">long</span> - Select <span class="code-object">long</span> timestamp format
+ quit or ^D - Exit the program
+qpid: list
+Management <span class="code-object">Object</span> Types:
+ ObjectType Active Deleted
+ ================================
+ qpid.binding 21 0
+ qpid.broker 1 0
+ qpid.client 1 0
+ qpid.exchange 6 0
+ qpid.queue 13 0
+ qpid.session 4 0
+ qpid.system 1 0
+ qpid.vhost 1 0
+qpid: list qpid.system
+Objects of type qpid.system
+ ID Created Destroyed Index
+ ==================================
+ 1000 21:00:02 - host
+qpid: list 1000
+<span class="code-object">Object</span> of type qpid.system: (last sample time: 21:26:02)
+ Type Element 1000
+ =======================================================
+ config sysId host
+ config osName Linux
+ config nodeName localhost.localdomain
+ config release 2.6.24.4-64.fc8
+ config version #1 SMP Sat Mar 29 09:15:49 EDT 2008
+ config machine x86_64
+qpid: schema queue
+Schema <span class="code-keyword">for</span> class 'qpid.queue':
+ Element Type Unit Access Notes Description
+ ===================================================================================================================
+ vhostRef reference ReadCreate index
+ name <span class="code-object">short</span>-string ReadCreate index
+ durable <span class="code-object">boolean</span> ReadCreate
+ autoDelete <span class="code-object">boolean</span> ReadCreate
+ exclusive <span class="code-object">boolean</span> ReadCreate
+ arguments field-table ReadOnly Arguments supplied in queue.declare
+ storeRef reference ReadOnly Reference to persistent queue (<span class="code-keyword">if</span> durable)
+ msgTotalEnqueues uint64 message Total messages enqueued
+ msgTotalDequeues uint64 message Total messages dequeued
+ msgTxnEnqueues uint64 message Transactional messages enqueued
+ msgTxnDequeues uint64 message Transactional messages dequeued
+ msgPersistEnqueues uint64 message Persistent messages enqueued
+ msgPersistDequeues uint64 message Persistent messages dequeued
+ msgDepth uint32 message Current size of queue in messages
+ msgDepthHigh uint32 message Current size of queue in messages (High)
+ msgDepthLow uint32 message Current size of queue in messages (Low)
+ byteTotalEnqueues uint64 octet Total messages enqueued
+ byteTotalDequeues uint64 octet Total messages dequeued
+ byteTxnEnqueues uint64 octet Transactional messages enqueued
+ byteTxnDequeues uint64 octet Transactional messages dequeued
+ bytePersistEnqueues uint64 octet Persistent messages enqueued
+ bytePersistDequeues uint64 octet Persistent messages dequeued
+ byteDepth uint32 octet Current size of queue in bytes
+ byteDepthHigh uint32 octet Current size of queue in bytes (High)
+ byteDepthLow uint32 octet Current size of queue in bytes (Low)
+ enqueueTxnStarts uint64 transaction Total enqueue transactions started
+ enqueueTxnCommits uint64 transaction Total enqueue transactions committed
+ enqueueTxnRejects uint64 transaction Total enqueue transactions rejected
+ enqueueTxnCount uint32 transaction Current pending enqueue transactions
+ enqueueTxnCountHigh uint32 transaction Current pending enqueue transactions (High)
+ enqueueTxnCountLow uint32 transaction Current pending enqueue transactions (Low)
+ dequeueTxnStarts uint64 transaction Total dequeue transactions started
+ dequeueTxnCommits uint64 transaction Total dequeue transactions committed
+ dequeueTxnRejects uint64 transaction Total dequeue transactions rejected
+ dequeueTxnCount uint32 transaction Current pending dequeue transactions
+ dequeueTxnCountHigh uint32 transaction Current pending dequeue transactions (High)
+ dequeueTxnCountLow uint32 transaction Current pending dequeue transactions (Low)
+ consumers uint32 consumer Current consumers on queue
+ consumersHigh uint32 consumer Current consumers on queue (High)
+ consumersLow uint32 consumer Current consumers on queue (Low)
+ bindings uint32 binding Current bindings
+ bindingsHigh uint32 binding Current bindings (High)
+ bindingsLow uint32 binding Current bindings (Low)
+ unackedMessages uint32 message Messages consumed but not yet acked
+ unackedMessagesHigh uint32 message Messages consumed but not yet acked (High)
+ unackedMessagesLow uint32 message Messages consumed but not yet acked (Low)
+ messageLatencySamples delta-time nanosecond Broker latency through <span class="code-keyword">this</span> queue (Samples)
+ messageLatencyMin delta-time nanosecond Broker latency through <span class="code-keyword">this</span> queue (Min)
+ messageLatencyMax delta-time nanosecond Broker latency through <span class="code-keyword">this</span> queue (Max)
+ messageLatencyAverage delta-time nanosecond Broker latency through <span class="code-keyword">this</span> queue (Average)
+Method 'purge' Discard all messages on queue
+qpid: list queue
+Objects of type qpid.queue
+ ID Created Destroyed Index
+ ===========================================================================
+ 1012 21:08:13 - 1002.pub_start
+ 1014 21:08:13 - 1002.pub_done
+ 1016 21:08:13 - 1002.sub_ready
+ 1018 21:08:13 - 1002.sub_done
+ 1020 21:08:13 - 1002.perftest0
+ 1038 21:09:08 - 1002.mgmt-3206ff16-fb29-4a30-82ea-e76f50dd7d15
+ 1040 21:09:08 - 1002.repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15
+ 1046 21:09:32 - 1002.mgmt-df06c7a6-4ce7-426a-9f66-da91a2a6a837
+ 1048 21:09:32 - 1002.repl-df06c7a6-4ce7-426a-9f66-da91a2a6a837
+ 1054 21:10:01 - 1002.mgmt-c55915c2-2fda-43ee-9410-b1c1cbb3e4ae
+ 1056 21:10:01 - 1002.repl-c55915c2-2fda-43ee-9410-b1c1cbb3e4ae
+ 1063 21:26:00 - 1002.mgmt-8d621997-6356-48c3-acab-76a37081d0f3
+ 1065 21:26:00 - 1002.repl-8d621997-6356-48c3-acab-76a37081d0f3
+qpid: list 1020
+<span class="code-object">Object</span> of type qpid.queue: (last sample time: 21:26:02)
+ Type Element 1020
+ ==========================================================================
+ config vhostRef 1002
+ config name perftest0
+ config durable False
+ config autoDelete False
+ config exclusive False
+ config arguments {'qpid.max_size': 0, 'qpid.max_count': 0}
+ config storeRef NULL
+ inst msgTotalEnqueues 500000 messages
+ inst msgTotalDequeues 500000
+ inst msgTxnEnqueues 0
+ inst msgTxnDequeues 0
+ inst msgPersistEnqueues 0
+ inst msgPersistDequeues 0
+ inst msgDepth 0
+ inst msgDepthHigh 0
+ inst msgDepthLow 0
+ inst byteTotalEnqueues 512000000 octets
+ inst byteTotalDequeues 512000000
+ inst byteTxnEnqueues 0
+ inst byteTxnDequeues 0
+ inst bytePersistEnqueues 0
+ inst bytePersistDequeues 0
+ inst byteDepth 0
+ inst byteDepthHigh 0
+ inst byteDepthLow 0
+ inst enqueueTxnStarts 0 transactions
+ inst enqueueTxnCommits 0
+ inst enqueueTxnRejects 0
+ inst enqueueTxnCount 0
+ inst enqueueTxnCountHigh 0
+ inst enqueueTxnCountLow 0
+ inst dequeueTxnStarts 0
+ inst dequeueTxnCommits 0
+ inst dequeueTxnRejects 0
+ inst dequeueTxnCount 0
+ inst dequeueTxnCountHigh 0
+ inst dequeueTxnCountLow 0
+ inst consumers 0 consumers
+ inst consumersHigh 0
+ inst consumersLow 0
+ inst bindings 1 binding
+ inst bindingsHigh 1
+ inst bindingsLow 1
+ inst unackedMessages 0 messages
+ inst unackedMessagesHigh 0
+ inst unackedMessagesLow 0
+ inst messageLatencySamples 0
+ inst messageLatencyMin 0
+ inst messageLatencyMax 0
+ inst messageLatencyAverage 0
+qpid:</pre>
+</div></div>
+
+<p>You get the idea... have fun!</p>
+
+
+
+ </td>
+ </tr>
+ </table>
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td height="12" background="border/border_bottom.gif"><img src="border/spacer.gif" width="1" height="1" border="0"/></td>
+ </tr>
+ <tr>
+ <td align="center"><font color="grey">Document generated by Confluence on Apr 22, 2008 02:47</font></td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file