You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jo...@apache.org on 2010/06/20 00:15:13 UTC
svn commit: r956304 [6/33] - in /qpid/site/docs/books/0.7: ./
AMQP-Messaging-Broker-CPP-Book/ AMQP-Messaging-Broker-CPP-Book/html-single/
AMQP-Messaging-Broker-CPP-Book/html-single/images/
AMQP-Messaging-Broker-CPP-Book/html-single/images/jmx_console/ ...
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/ch03s03.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/ch03s03.html?rev=956304&view=auto
==============================================================================
--- qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/ch03s03.html (added)
+++ qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/ch03s03.html Sat Jun 19 22:15:03 2010
@@ -0,0 +1,704 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3. QMF Python Console Tutorial</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="AMQP Messaging Broker (Implemented in C++)"><link rel="up" href="ch03.html" title="Chapter 3. Managing the AMQP Messaging Broker"><link rel="prev" href="ch03s02.html" title="2. Qpid Management Framework"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.
+ QMF Python Console Tutorial
+ </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a> </td><th width="60%" align="center">Chapter 3.
+ Managing the AMQP Messaging Broker
+ </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="section" title="3. QMF Python Console Tutorial"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2943217"></a>3.
+ QMF Python Console Tutorial
+ </h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-PrerequisiteInstallQpidMessaging" title="3.1. Prerequisite - Install Qpid Messaging">Section 3.1, “
+ Prerequisite
+ - Install Qpid Messaging
+ ”</a>
+ </p></li><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-SynchronousConsoleOperations" title="3.2. Synchronous Console Operations">Section 3.2, “
+ Synchronous
+ Console Operations
+ ”</a>
+ </p></li><li class="listitem"><p>
+ </p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-CreatingaQMFConsoleSessionandAttachingtoaBroker" title="3.2.1. Creating a QMF Console Session and Attaching to a Broker">Section 3.2.1, “
+ Creating a QMF Console Session and Attaching to a Broker
+ ”</a>
+ </p></li><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-AccessingManagedObjects" title="3.2.2. Accessing Managed Objects">Section 3.2.2, “
+ Accessing
+ Managed Objects
+ ”</a>
+ </p></li><li class="listitem"><p>
+ </p><div class="itemizedlist"><ul class="itemizedlist" type="square"><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-ViewingPropertiesandStatisticsofanObject" title="3.2.2.1. Viewing Properties and Statistics of an Object">Section 3.2.2.1, “
+ Viewing Properties and Statistics of an Object
+ ”</a>
+ </p></li><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-InvokingMethodsonanObject" title="3.2.2.2. Invoking Methods on an Object">Section 3.2.2.2, “
+ Invoking
+ Methods on an Object
+ ”</a>
+ </p></li></ul></div><p>
+ </p></li></ul></div><p>
+ </p></li><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-AsynchronousConsoleOperations" title="3.3. Asynchronous Console Operations">Section 3.3, “
+ Asynchronous
+ Console Operations
+ ”</a>
+ </p></li><li class="listitem"><p>
+ </p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-CreatingaConsoleClasstoReceiveAsynchronousData" title="3.3.1. Creating a Console Class to Receive Asynchronous Data">Section 3.3.1, “
+ Creating a Console Class to Receive Asynchronous Data
+ ”</a>
+ </p></li><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-ReceivingEvents" title="3.3.2. Receiving Events">Section 3.3.2, “
+ Receiving
+ Events
+ ”</a>
+ </p></li><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-ReceivingObjects" title="3.3.3. Receiving Objects">Section 3.3.3, “
+ Receiving
+ Objects
+ ”</a>
+ </p></li><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-AsynchronousMethodCallsandMethodTimeouts" title="3.3.4. Asynchronous Method Calls and Method Timeouts">Section 3.3.4, “
+ Asynchronous Method Calls and Method Timeouts
+ ”</a>
+ </p></li></ul></div><p>
+ </p></li><li class="listitem"><p>
+ <a class="xref" href="ch03s03.html#QMFPythonConsoleTutorial-DiscoveringwhatKindsofObjectsareAvailable" title="3.4. Discovering what Kinds of Objects are Available">Section 3.4, “
+ Discovering what Kinds of Objects are Available
+ ”</a>
+ </p></li></ul></div><div class="section" title="3.1. Prerequisite - Install Qpid Messaging"><div class="titlepage"><div><div><h3 class="title"><a name="QMFPythonConsoleTutorial-PrerequisiteInstallQpidMessaging"></a>3.1.
+ Prerequisite
+ - Install Qpid Messaging
+ </h3></div></div></div><p>
+ QMF uses AMQP Messaging (QPid) as its means of communication. To
+ use QMF, Qpid messaging must be installed somewhere in the
+ network. Qpid can be downloaded as source from Apache, is
+ packaged with a number of Linux distributions, and can be
+ purchased from commercial vendors that use Qpid. Please see
+ <a class="ulink" href="http://qpid.apache.org" target="_top">http://qpid.apache.org</a>for
+ information as to where to get Qpid Messaging.
+ </p><p>
+ Qpid Messaging includes a message broker (qpidd) which typically
+ runs as a daemon on a system. It also includes client bindings in
+ various programming languages. The Python-language client library
+ includes the QMF console libraries needed for this tutorial.
+ </p><p>
+ Please note that Qpid Messaging has two broker implementations.
+ One is implemented in C++ and the other in Java. At press time,
+ QMF is supported only by the C++ broker.
+ </p><p>
+ If the goal is to get the tutorial examples up and running as
+ quickly as possible, all of the Qpid components can be installed
+ on a single system (even a laptop). For more realistic
+ deployments, the broker can be deployed on a server and the
+ client/QMF libraries installed on other systems.
+ </p></div><div class="section" title="3.2. Synchronous Console Operations"><div class="titlepage"><div><div><h3 class="title"><a name="QMFPythonConsoleTutorial-SynchronousConsoleOperations"></a>3.2.
+ Synchronous
+ Console Operations
+ </h3></div></div></div><p>
+ The Python console API for QMF can be used in a synchronous
+ style, an asynchronous style, or a combination of both.
+ Synchronous operations are conceptually simple and are well
+ suited for user-interactive tasks. All operations are performed
+ in the context of a Python function call. If communication over
+ the message bus is required to complete an operation, the
+ function call blocks and waits for the expected result (or
+ timeout failure) before returning control to the caller.
+ </p><div class="section" title="3.2.1. Creating a QMF Console Session and Attaching to a Broker"><div class="titlepage"><div><div><h4 class="title"><a name="QMFPythonConsoleTutorial-CreatingaQMFConsoleSessionandAttachingtoaBroker"></a>3.2.1.
+ Creating a QMF Console Session and Attaching to a Broker
+ </h4></div></div></div><p>
+ For the purposes of this tutorial, code examples will be shown as
+ they are entered in an interactive python session.
+ </p><pre class="programlisting">
+$ python
+Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
+[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
+Type "help", "copyright", "credits" or "license" for more information.
+>>>
+</pre><p>
+ We will begin by importing the required libraries. If the Python
+ client is properly installed, these libraries will be found
+ normally by the Python interpreter.
+ </p><pre class="programlisting">
+>>> from qmf.console import Session
+</pre><p>
+ We must now create a <span class="emphasis"><em>Session</em></span> object to manage this QMF
+ console session.
+ </p><pre class="programlisting">
+>>> sess = Session()
+</pre><p>
+ If no arguments are supplied to the creation of <span class="emphasis"><em>Session</em></span>,
+ it defaults to synchronous-only operation. It also defaults to
+ user-management of connections. More on this in a moment.
+ </p><p>
+ We will now establish a connection to the messaging broker. If
+ the broker daemon is running on the local host, simply use the
+ following:
+ </p><pre class="programlisting">
+>>> broker = sess.addBroker()
+</pre><p>
+ If the messaging broker is on a remote host, supply the URL to
+ the broker in the <span class="emphasis"><em>addBroker</em></span> function call. Here's how to
+ connect to a local broker using the URL.
+ </p><pre class="programlisting">
+>>> broker = sess.addBroker("amqp://localhost")
+</pre><p>
+ The call to <span class="emphasis"><em>addBroker</em></span> is synchronous and will return
+ only after the connection has been successfully established or
+ has failed. If a failure occurs, <span class="emphasis"><em>addBroker</em></span> will raise an
+ exception that can be handled by the console script.
+ </p><pre class="programlisting">
+>>> try:
+... broker = sess.addBroker("amqp://localhost:1000")
+... except:
+... print "Connection Failed"
+...
+Connection Failed
+>>>
+</pre><p>
+ This operation fails because there is no Qpid Messaging broker
+ listening on port 1000 (the default port for qpidd is 5672).
+ </p><p>
+ If preferred, the QMF session can manage the connection for you.
+ In this case, <span class="emphasis"><em>addBroker</em></span> returns immediately and the
+ session attempts to establish the connection in the background.
+ This will be covered in detail in the section on asynchronous
+ operations.
+ </p></div><div class="section" title="3.2.2. Accessing Managed Objects"><div class="titlepage"><div><div><h4 class="title"><a name="QMFPythonConsoleTutorial-AccessingManagedObjects"></a>3.2.2.
+ Accessing
+ Managed Objects
+ </h4></div></div></div><p>
+ The Python console API provides access to remotely managed
+ objects via a <span class="emphasis"><em>proxy</em></span> model. The API gives the client an
+ object that serves as a proxy representing the "real" object
+ being managed on the agent application. Operations performed on
+ the proxy result in the same operations on the real object.
+ </p><p>
+ The following examples assume prior knowledge of the kinds of
+ objects that are actually available to be managed. There is a
+ section later in this tutorial that describes how to discover
+ what is manageable on the QMF bus.
+ </p><p>
+ Proxy objects are obtained by calling the
+ <span class="emphasis"><em>Session.getObjects</em></span> function.
+ </p><p>
+ To illustrate, we'll get a list of objects representing queues in
+ the message broker itself.
+ </p><pre class="programlisting">
+>>> queues = sess.getObjects(_class="queue", _package="org.apache.qpid.broker")
+</pre><p>
+ <span class="emphasis"><em>queues</em></span> is an array of proxy objects representing real
+ queues on the message broker. A proxy object can be printed to
+ display a description of the object.
+ </p><pre class="programlisting">
+>>> for q in queues:
+... print q
+...
+org.apache.qpid.broker:queue[0-1537-1-0-58] 0-0-1-0-1152921504606846979:reply-localhost.localdomain.32004
+org.apache.qpid.broker:queue[0-1537-1-0-61] 0-0-1-0-1152921504606846979:topic-localhost.localdomain.32004
+>>>
+</pre><div class="section" title="3.2.2.1. Viewing Properties and Statistics of an Object"><div class="titlepage"><div><div><h5 class="title"><a name="QMFPythonConsoleTutorial-ViewingPropertiesandStatisticsofanObject"></a>3.2.2.1.
+ Viewing Properties and Statistics of an Object
+ </h5></div></div></div><p>
+ Let us now focus our attention on one of the queue objects.
+ </p><pre class="programlisting">
+>>> queue = queues[0]
+</pre><p>
+ The attributes of an object are partitioned into
+ <span class="emphasis"><em>properties</em></span> and <span class="emphasis"><em>statistics</em></span>. Though the
+ distinction is somewhat arbitrary, <span class="emphasis"><em>properties</em></span> tend to
+ be fairly static and may also be large and <span class="emphasis"><em>statistics</em></span>
+ tend to change rapidly and are relatively small (counters, etc.).
+ </p><p>
+ There are two ways to view the properties of an object. An array
+ of properties can be obtained using the <span class="emphasis"><em>getProperties</em></span>
+ function:
+ </p><pre class="programlisting">
+>>> props = queue.getProperties()
+>>> for prop in props:
+... print prop
+...
+(vhostRef, 0-0-1-0-1152921504606846979)
+(name, u'reply-localhost.localdomain.32004')
+(durable, False)
+(autoDelete, True)
+(exclusive, True)
+(arguments, {})
+>>>
+</pre><p>
+ The <span class="emphasis"><em>getProperties</em></span> function returns an array of tuples.
+ Each tuple consists of the property descriptor and the property
+ value.
+ </p><p>
+ A more convenient way to access properties is by using the
+ attribute of the proxy object directly:
+ </p><pre class="programlisting">
+>>> queue.autoDelete
+True
+>>> queue.name
+u'reply-localhost.localdomain.32004'
+>>>
+</pre><p>
+ Statistics are accessed in the same way:
+ </p><pre class="programlisting">
+>>> stats = queue.getStatistics()
+>>> for stat in stats:
+... print stat
+...
+(msgTotalEnqueues, 53)
+(msgTotalDequeues, 53)
+(msgTxnEnqueues, 0)
+(msgTxnDequeues, 0)
+(msgPersistEnqueues, 0)
+(msgPersistDequeues, 0)
+(msgDepth, 0)
+(byteDepth, 0)
+(byteTotalEnqueues, 19116)
+(byteTotalDequeues, 19116)
+(byteTxnEnqueues, 0)
+(byteTxnDequeues, 0)
+(bytePersistEnqueues, 0)
+(bytePersistDequeues, 0)
+(consumerCount, 1)
+(consumerCountHigh, 1)
+(consumerCountLow, 1)
+(bindingCount, 2)
+(bindingCountHigh, 2)
+(bindingCountLow, 2)
+(unackedMessages, 0)
+(unackedMessagesHigh, 0)
+(unackedMessagesLow, 0)
+(messageLatencySamples, 0)
+(messageLatencyMin, 0)
+(messageLatencyMax, 0)
+(messageLatencyAverage, 0)
+>>>
+</pre><p>
+ or alternatively:
+ </p><pre class="programlisting">
+>>> queue.byteTotalEnqueues
+19116
+>>>
+</pre><p>
+ The proxy objects do not automatically track changes that occur
+ on the real objects. For example, if the real queue enqueues more
+ bytes, viewing the <span class="emphasis"><em>byteTotalEnqueues</em></span> statistic will show
+ the same number as it did the first time. To get updated data on
+ a proxy object, use the <span class="emphasis"><em>update</em></span> function call:
+ </p><pre class="programlisting">
+>>> queue.update()
+>>> queue.byteTotalEnqueues
+19783
+>>>
+</pre><div class="note" title="Be Advised" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Be Advised</h3><p>
+ The <span class="emphasis"><em>update</em></span> method was added after the M4 release
+ of Qpid/Qmf. It may not be available in your
+ distribution.
+ </p></div></div><div class="section" title="3.2.2.2. Invoking Methods on an Object"><div class="titlepage"><div><div><h5 class="title"><a name="QMFPythonConsoleTutorial-InvokingMethodsonanObject"></a>3.2.2.2.
+ Invoking
+ Methods on an Object
+ </h5></div></div></div><p>
+ Up to this point, we have used the QMF Console API to find
+ managed objects and view their attributes, a read-only activity.
+ The next topic to illustrate is how to invoke a method on a
+ managed object. Methods allow consoles to control the managed
+ agents by either triggering a one-time action or by changing the
+ values of attributes in an object.
+ </p><p>
+ First, we'll cover some background information about methods. A
+ <span class="emphasis"><em>QMF object class</em></span> (of which a <span class="emphasis"><em>QMF object</em></span> is an
+ instance), may have zero or more methods. To obtain a list of
+ methods available for an object, use the <span class="emphasis"><em>getMethods</em></span>
+ function.
+ </p><pre class="programlisting">
+>>> methodList = queue.getMethods()
+</pre><p>
+ <span class="emphasis"><em>getMethods</em></span> returns an array of method descriptors (of
+ type qmf.console.SchemaMethod). To get a summary of a method, you
+ can simply print it. The _<span class="emphasis"><em>repr</em></span>_ function returns a
+ string that looks like a function prototype.
+ </p><pre class="programlisting">
+>>> print methodList
+[purge(request)]
+>>>
+</pre><p>
+ For the purposes of illustration, we'll use a more interesting
+ method available on the <span class="emphasis"><em>broker</em></span> object which represents
+ the connected Qpid message broker.
+ </p><pre class="programlisting">
+>>> br = sess.getObjects(_class="broker", _package="org.apache.qpid.broker")[0]
+>>> mlist = br.getMethods()
+>>> for m in mlist:
+... print m
+...
+echo(sequence, body)
+connect(host, port, durable, authMechanism, username, password, transport)
+queueMoveMessages(srcQueue, destQueue, qty)
+>>>
+</pre><p>
+ We have just learned that the <span class="emphasis"><em>broker</em></span> object has three
+ methods: <span class="emphasis"><em>echo</em></span>, <span class="emphasis"><em>connect</em></span>, and
+ <span class="emphasis"><em>queueMoveMessages</em></span>. We'll use the <span class="emphasis"><em>echo</em></span> method to
+ "ping" the broker.
+ </p><pre class="programlisting">
+>>> result = br.echo(1, "Message Body")
+>>> print result
+OK (0) - {'body': u'Message Body', 'sequence': 1}
+>>> print result.status
+0
+>>> print result.text
+OK
+>>> print result.outArgs
+{'body': u'Message Body', 'sequence': 1}
+>>>
+</pre><p>
+ In the above example, we have invoked the <span class="emphasis"><em>echo</em></span> method on
+ the instance of the broker designated by the proxy "br" with a
+ sequence argument of 1 and a body argument of "Message Body". The
+ result indicates success and contains the output arguments (in
+ this case copies of the input arguments).
+ </p><p>
+ To be more precise... Calling <span class="emphasis"><em>echo</em></span> on the proxy causes
+ the input arguments to be marshalled and sent to the remote agent
+ where the method is executed. Once the method execution
+ completes, the output arguments are marshalled and sent back to
+ the console to be stored in the method result.
+ </p><p>
+ You are probably wondering how you are supposed to know what
+ types the arguments are and which arguments are input, which are
+ output, or which are both. This will be addressed later in the
+ "Discovering what Kinds of Objects are Available" section.
+ </p></div></div></div><div class="section" title="3.3. Asynchronous Console Operations"><div class="titlepage"><div><div><h3 class="title"><a name="QMFPythonConsoleTutorial-AsynchronousConsoleOperations"></a>3.3.
+ Asynchronous
+ Console Operations
+ </h3></div></div></div><p>
+ QMF is built on top of a middleware messaging layer (Qpid
+ Messaging). Because of this, QMF can use some communication
+ patterns that are difficult to implement using network transports
+ like UDP, TCP, or SSL. One of these patterns is called the
+ <span class="emphasis"><em>Publication and Subscription</em></span> pattern (pub-sub for
+ short). In the pub-sub pattern, data sources <span class="emphasis"><em>publish</em></span>
+ information without a particular destination in mind. Data sinks
+ (destinations) <span class="emphasis"><em>subscribe</em></span> using a set of criteria that
+ describes what kind of data they are interested in receiving.
+ Data published by a source may be received by zero, one, or many
+ subscribers.
+ </p><p>
+ QMF uses the pub-sub pattern to distribute events, object
+ creation and deletion, and changes to properties and statistics.
+ A console application using the QMF Console API can receive these
+ asynchronous and unsolicited events and updates. This is useful
+ for applications that store and analyze events and/or statistics.
+ It is also useful for applications that react to certain events
+ or conditions.
+ </p><p>
+ Note that console applications may always use the synchronous
+ mechanisms.
+ </p><div class="section" title="3.3.1. Creating a Console Class to Receive Asynchronous Data"><div class="titlepage"><div><div><h4 class="title"><a name="QMFPythonConsoleTutorial-CreatingaConsoleClasstoReceiveAsynchronousData"></a>3.3.1.
+ Creating a Console Class to Receive Asynchronous Data
+ </h4></div></div></div><p>
+ Asynchronous API operation occurs when the console application
+ supplies a <span class="emphasis"><em>Console</em></span> object to the session manager. The
+ <span class="emphasis"><em>Console</em></span> object (which overrides the
+ <span class="emphasis"><em>qmf.console.Console</em></span> class) handles all asynchronously
+ arriving data. The <span class="emphasis"><em>Console</em></span> class has the following
+ methods. Any number of these methods may be overridden by the
+ console application. Any method that is not overridden defaults
+ to a null handler which takes no action when invoked.
+ </p><div class="table"><a name="id2948337"></a><p class="title"><b>Table 3.4. QMF Python Console Class Methods</b></p><div class="table-contents"><table summary="QMF Python Console Class Methods" border="1"><colgroup><col><col><col></colgroup><tbody><tr><td>
+ Method
+ </td><td>
+ Arguments
+ </td><td>
+ Invoked when...
+ </td></tr><tr><td>
+ brokerConnected
+ </td><td>
+ broker
+ </td><td>
+ a connection to a broker is established
+ </td></tr><tr><td>
+ brokerDisconnected
+ </td><td>
+ broker
+ </td><td>
+ a connection to a broker is lost
+ </td></tr><tr><td>
+ newPackage
+ </td><td>
+ name
+ </td><td>
+ a new package is seen on the QMF bus
+ </td></tr><tr><td>
+ newClass
+ </td><td>
+ kind, classKey
+ </td><td>
+ a new class (event or object) is seen on the QMF bus
+ </td></tr><tr><td>
+ newAgent
+ </td><td>
+ agent
+ </td><td>
+ a new agent appears on the QMF bus
+ </td></tr><tr><td>
+ delAgent
+ </td><td>
+ agent
+ </td><td>
+ an agent disconnects from the QMF bus
+ </td></tr><tr><td>
+ objectProps
+ </td><td>
+ broker, object
+ </td><td>
+ the properties of an object are published
+ </td></tr><tr><td>
+ objectStats
+ </td><td>
+ broker, object
+ </td><td>
+ the statistics of an object are published
+ </td></tr><tr><td>
+ event
+ </td><td>
+ broker, event
+ </td><td>
+ an event is published
+ </td></tr><tr><td>
+ heartbeat
+ </td><td>
+ agent, timestamp
+ </td><td>
+ a heartbeat is published by an agent
+ </td></tr><tr><td>
+ brokerInfo
+ </td><td>
+ broker
+ </td><td>
+ information about a connected broker is available to be
+ queried
+ </td></tr><tr><td>
+ methodResponse
+ </td><td>
+ broker, seq, response
+ </td><td>
+ the result of an asynchronous method call is received
+ </td></tr></tbody></table></div></div><br class="table-break"><p>
+ Supplied with the API is a class called <span class="emphasis"><em>DebugConsole</em></span>.
+ This is a test <span class="emphasis"><em>Console</em></span> instance that overrides all of
+ the methods such that arriving asynchronous data is printed to
+ the screen. This can be used to see all of the arriving
+ asynchronous data.
+ </p></div><div class="section" title="3.3.2. Receiving Events"><div class="titlepage"><div><div><h4 class="title"><a name="QMFPythonConsoleTutorial-ReceivingEvents"></a>3.3.2.
+ Receiving
+ Events
+ </h4></div></div></div><p>
+ We'll start the example from the beginning to illustrate the
+ reception and handling of events. In this example, we will create
+ a <span class="emphasis"><em>Console</em></span> class that handles broker-connect,
+ broker-disconnect, and event messages. We will also allow the
+ session manager to manage the broker connection for us.
+ </p><p>
+ Begin by importing the necessary classes:
+ </p><pre class="programlisting">
+>>> from qmf.console import Session, Console
+</pre><p>
+ Now, create a subclass of <span class="emphasis"><em>Console</em></span> that handles the three
+ message types:
+ </p><pre class="programlisting">
+>>> class EventConsole(Console):
+... def brokerConnected(self, broker):
+... print "brokerConnected:", broker
+... def brokerDisconnected(self, broker):
+... print "brokerDisconnected:", broker
+... def event(self, broker, event):
+... print "event:", event
+...
+>>>
+</pre><p>
+ Make an instance of the new class:
+ </p><pre class="programlisting">
+>>> myConsole = EventConsole()
+</pre><p>
+ Create a <span class="emphasis"><em>Session</em></span> class using the console instance. In
+ addition, we shall request that the session manager do the
+ connection management for us. Notice also that we are requesting
+ that the session manager not receive objects or heartbeats. Since
+ this example is concerned only with events, we can optimize the
+ use of the messaging bus by telling the session manager not to
+ subscribe for object updates or heartbeats.
+ </p><pre class="programlisting">
+>>> sess = Session(myConsole, manageConnections=True, rcvObjects=False, rcvHeartbeats=False)
+>>> broker = sess.addBroker()
+>>>
+</pre><p>
+ Once the broker is added, we will begin to receive asynchronous
+ events (assuming there is a functioning broker available to
+ connect to).
+ </p><pre class="programlisting">
+brokerConnected: Broker connected at: localhost:5672
+event: Thu Jan 29 19:53:19 2009 INFO org.apache.qpid.broker:bind broker=localhost:5672 ...
+</pre></div><div class="section" title="3.3.3. Receiving Objects"><div class="titlepage"><div><div><h4 class="title"><a name="QMFPythonConsoleTutorial-ReceivingObjects"></a>3.3.3.
+ Receiving
+ Objects
+ </h4></div></div></div><p>
+ To illustrate asynchronous handling of objects, a small console
+ program is supplied. The entire program is shown below for
+ convenience. We will then go through it part-by-part to explain
+ its design.
+ </p><p>
+ This console program receives object updates and displays a set
+ of statistics as they change. It focuses on broker queue objects.
+ </p><pre class="programlisting">
+# Import needed classes
+from qmf.console import Session, Console
+from time import sleep
+
+# Declare a dictionary to map object-ids to queue names
+queueMap = {}
+
+# Customize the Console class to receive object updates.
+class MyConsole(Console):
+
+ # Handle property updates
+ def objectProps(self, broker, record):
+
+ # Verify that we have received a queue object. Exit otherwise.
+ classKey = record.getClassKey()
+ if classKey.getClassName() != "queue":
+ return
+
+ # If this object has not been seen before, create a new mapping from objectID to name
+ oid = record.getObjectId()
+ if oid not in queueMap:
+ queueMap[oid] = record.name
+
+ # Handle statistic updates
+ def objectStats(self, broker, record):
+
+ # Ignore updates for objects that are not in the map
+ oid = record.getObjectId()
+ if oid not in queueMap:
+ return
+
+ # Print the queue name and some statistics
+ print "%s: enqueues=%d dequeues=%d" % (queueMap[oid], record.msgTotalEnqueues, record.msgTotalDequeues)
+
+ # if the delete-time is non-zero, this object has been deleted. Remove it from the map.
+ if record.getTimestamps()[2] > 0:
+ queueMap.pop(oid)
+
+# Create an instance of the QMF session manager. Set userBindings to True to allow
+# this program to choose which objects classes it is interested in.
+sess = Session(MyConsole(), manageConnections=True, rcvEvents=False, userBindings=True)
+
+# Register to receive updates for broker:queue objects.
+sess.bindClass("org.apache.qpid.broker", "queue")
+broker = sess.addBroker()
+
+# Suspend processing while the asynchronous operations proceed.
+try:
+ while True:
+ sleep(1)
+except:
+ pass
+
+# Disconnect the broker before exiting.
+sess.delBroker(broker)
+</pre><p>
+ Before going through the code in detail, it is important to
+ understand the differences between synchronous object access and
+ asynchronous object access. When objects are obtained
+ synchronously (using the <span class="emphasis"><em>getObjects</em></span> function), the
+ resulting proxy contains all of the object's attributes, both
+ properties and statistics. When object data is published
+ asynchronously, the properties and statistics are sent separately
+ and only when the session first connects or when the content
+ changes.
+ </p><p>
+ The script wishes to print the queue name with the updated
+ statistics, but the queue name is only present with the
+ properties. For this reason, the program needs to keep some state
+ to correlate property updates with their corresponding statistic
+ updates. This can be done using the <span class="emphasis"><em>ObjectId</em></span> that
+ uniquely identifies the object.
+ </p><pre class="programlisting">
+ # If this object has not been seen before, create a new mapping from objectID to name
+ oid = record.getObjectId()
+ if oid not in queueMap:
+ queueMap[oid] = record.name
+</pre><p>
+ The above code fragment gets the object ID from the proxy and
+ checks to see if it is in the map (i.e. has been seen before). If
+ it is not in the map, a new map entry is inserted mapping the
+ object ID to the queue's name.
+ </p><pre class="programlisting">
+ # if the delete-time is non-zero, this object has been deleted. Remove it from the map.
+ if record.getTimestamps()[2] > 0:
+ queueMap.pop(oid)
+</pre><p>
+ This code fragment detects the deletion of a managed object.
+ After reporting the statistics, it checks the timestamps of the
+ proxy. <span class="emphasis"><em>getTimestamps</em></span> returns a list of timestamps in the
+ order:
+ </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
+ <span class="emphasis"><em>Current</em></span> - The timestamp of the sending of this update.
+ </p></li><li class="listitem"><p>
+ <span class="emphasis"><em>Create</em></span> - The time of the object's creation
+ </p></li><li class="listitem"><p>
+ <span class="emphasis"><em>Delete</em></span> - The time of the object's deletion (or zero if
+ not deleted)
+ </p></li></ul></div><p>
+ This code structure is useful for getting information about
+ very-short-lived objects. It is possible that an object will be
+ created, used, and deleted within an update interval. In this
+ case, the property update will arrive first, followed by the
+ statistic update. Both will indicate that the object has been
+ deleted but a full accounting of the object's existence and final
+ state is reported.
+ </p><pre class="programlisting">
+# Create an instance of the QMF session manager. Set userBindings to True to allow
+# this program to choose which objects classes it is interested in.
+sess = Session(MyConsole(), manageConnections=True, rcvEvents=False, userBindings=True)
+
+# Register to receive updates for broker:queue objects.
+sess.bindClass("org.apache.qpid.broker", "queue")
+</pre><p>
+ The above code is illustrative of the way a console application
+ can tune its use of the QMF bus. Note that <span class="emphasis"><em>rcvEvents</em></span> is
+ set to False. This prevents the reception of events. Note also
+ the use of <span class="emphasis"><em>userBindings=True</em></span> and the call to
+ <span class="emphasis"><em>sess.bindClass</em></span>. If <span class="emphasis"><em>userBindings</em></span> is set to False
+ (its default), the session will receive object updates for all
+ classes of object. In the case above, the application is only
+ interested in broker:queue objects and reduces its bus bandwidth
+ usage by requesting updates to only that class.
+ <span class="emphasis"><em>bindClass</em></span> may be called as many times as desired to add
+ classes to the list of subscribed classes.
+ </p></div><div class="section" title="3.3.4. Asynchronous Method Calls and Method Timeouts"><div class="titlepage"><div><div><h4 class="title"><a name="QMFPythonConsoleTutorial-AsynchronousMethodCallsandMethodTimeouts"></a>3.3.4.
+ Asynchronous Method Calls and Method Timeouts
+ </h4></div></div></div><p>
+ Method calls can also be invoked asynchronously. This is useful
+ if a large number of calls needs to be made in a short time
+ because the console application will not need to wait for the
+ complete round-trip delay for each call.
+ </p><p>
+ Method calls are synchronous by default. They can be made
+ asynchronous by adding the keyword-argument _<span class="emphasis"><em>async=True</em></span>
+ to the method call.
+ </p><p>
+ In a synchronous method call, the return value is the method
+ result. When a method is called asynchronously, the return value
+ is a sequence number that can be used to correlate the eventual
+ result to the request. This sequence number is passed as an
+ argument to the <span class="emphasis"><em>methodResponse</em></span> function in the
+ <span class="emphasis"><em>Console</em></span> interface.
+ </p><p>
+ It is important to realize that the <span class="emphasis"><em>methodResponse</em></span>
+ function may be invoked before the asynchronous call returns.
+ Make sure your code is written to handle this possibility.
+ </p></div></div><div class="section" title="3.4. Discovering what Kinds of Objects are Available"><div class="titlepage"><div><div><h3 class="title"><a name="QMFPythonConsoleTutorial-DiscoveringwhatKindsofObjectsareAvailable"></a>3.4.
+ Discovering what Kinds of Objects are Available
+ </h3></div></div></div><p></p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">2.
+ Qpid Management Framework
+ </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3112999.pdf
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3112999.pdf?rev=956304&view=auto
==============================================================================
Files qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3112999.pdf (added) and qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3112999.pdf Sat Jun 19 22:15:03 2010 differ
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113000.doc
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113000.doc?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113000.doc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113004.pdf
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113004.pdf?rev=956304&view=auto
==============================================================================
Files qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113004.pdf (added) and qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113004.pdf Sat Jun 19 22:15:03 2010 differ
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113005.doc
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113005.doc?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113005.doc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113098.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113098.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113098.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113099.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113099.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113099.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113100.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113100.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113100.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113101.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113101.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113101.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113102.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113102.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113102.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113103.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113103.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113103.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113104.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113104.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113104.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113105.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113105.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113105.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113106.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113106.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113106.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113107.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113107.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113107.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113108.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113108.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113108.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113109.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113109.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113109.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113110.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113110.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113110.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113111.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113111.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113111.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113112.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113112.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113112.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113113.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113113.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113113.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113114.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113114.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113114.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113115.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113115.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113115.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113116.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113116.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113116.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113117.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113117.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113117.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113118.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113118.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113118.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113119.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113119.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113119.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113120.pdf
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113120.pdf?rev=956304&view=auto
==============================================================================
Files qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113120.pdf (added) and qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113120.pdf Sat Jun 19 22:15:03 2010 differ
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113121.doc
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113121.doc?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/jmx_console/3113121.doc
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/qpid-logo.png
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/qpid-logo.png?rev=956304&view=auto
==============================================================================
Binary file - no diff available.
Propchange: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/images/qpid-logo.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/index.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/index.html?rev=956304&view=auto
==============================================================================
--- qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/index.html (added)
+++ qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/index.html Sat Jun 19 22:15:03 2010
@@ -0,0 +1,120 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>AMQP Messaging Broker (Implemented in C++)</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="AMQP Messaging Broker (Implemented in C++)"><link rel="next" href="pr01.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">AMQP Messaging Broker (Implemented in C++)</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="pr01.html">Next</a></td></tr></table><hr></div><div class="book" title="AMQP Messaging Broker (Implemented in C++)"><div class="titlepage"><div><div><h1 class="title"><a name="id2841692"></a>AMQP Messaging Broker (Implemented in C++)</h1></div></div><hr></div><div class="to
c"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="pr01.html"></a></span></dt><dt><span class="chapter"><a href="ch01.html">1.
+ Running the AMQP Messaging Broker
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01.html#section-Running-a-Qpid-CPP-Broker">1.
+ Running a Qpid C++ Broker
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01.html#RASC-BuildingtheCppBrokerandClientLibraries">1.1.
+ Building the
+ C++ Broker and Client Libraries
+ </a></span></dt><dt><span class="section"><a href="ch01.html#RASC-RunningtheCppBroker">1.2.
+ Running the C++ Broker
+ </a></span></dt><dt><span class="section"><a href="ch01.html#RASC-Mostcommonquestionsgettingqpiddrunning">1.3.
+ Most
+ common questions getting qpidd running
+ </a></span></dt><dt><span class="section"><a href="ch01.html#RASC-Authentication">1.4.
+ Authentication
+ </a></span></dt><dt><span class="section"><a href="ch01.html#RASC-Slightlymorecomplexconfiguration">1.5.
+ Slightly more
+ complex configuration
+ </a></span></dt><dt><span class="section"><a href="ch01.html#RASC-Loadingextramodules">1.6.
+ Loading extra modules
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch01s02.html">2.
+ Cheat Sheet for configuring Queue Options
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01s02.html#CheatSheetforconfiguringQueueOptions-ConfiguringQueueOptions">2.1.
+ Configuring
+ Queue Options
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch01s03.html">3.
+ Cheat Sheet for configuring Exchange Options
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01s03.html#CheatSheetforconfiguringExchangeOptions-ConfiguringExchangeOptions">3.1.
+ Configuring Exchange Options
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch01s04.html">4.
+ Using Broker Federation
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01s04.html#UsingBrokerFederation-Introduction">4.1.
+ Introduction
+ </a></span></dt><dt><span class="section"><a href="ch01s04.html#UsingBrokerFederation-WhatIsBrokerFederation-3F">4.2.
+ What Is
+ Broker Federation?
+ </a></span></dt><dt><span class="section"><a href="ch01s04.html#UsingBrokerFederation-TheqpidrouteUtility">4.3.
+ The
+ qpid-route Utility
+ </a></span></dt><dt><span class="section"><a href="ch01s04.html#UsingBrokerFederation-ExampleScenarios">4.4.
+ Example
+ Scenarios
+ </a></span></dt><dt><span class="section"><a href="ch01s04.html#UsingBrokerFederation-AdvancedTopics">4.5.
+ Advanced
+ Topics
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch01s05.html">5.
+ SSL
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01s05.html#SSL-SSLHowto">5.1.
+ SSL How to
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch01s06.html">6.
+ LVQ
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01s06.html#LVQ-UnderstandingLVQ">6.1.
+ Understanding LVQ
+ </a></span></dt><dt><span class="section"><a href="ch01s06.html#LVQ-LVQsemantics-3A">6.2.
+ LVQ semantics:
+ </a></span></dt><dt><span class="section"><a href="ch01s06.html#LVQ-LVQNOBROWSEsemantics-3A">6.3.
+ LVQ_NO_BROWSE
+ semantics:
+ </a></span></dt><dt><span class="section"><a href="ch01s06.html#LVQ-Examplesource">6.4.
+ LVQ Program Example
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch01s07.html">7.
+ Queue State Replication
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01s07.html#queuestatereplication-AsynchronousReplicationofQueueState">7.1.
+ Asynchronous
+ Replication of Queue State
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch01s08.html">8.
+ Starting a cluster
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01s08.html#Startingacluster-RunningaQpiddcluster">8.1.
+ Running a
+ Qpidd cluster
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch01s09.html">9.
+ ACL
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch01s09.html#ACL-v2ACLfileformatforbrokers">9.1.
+ v2 ACL file format for brokers
+ </a></span></dt><dt><span class="section"><a href="ch01s09.html#ACL-DesignDocumentation">9.2.
+ Design Documentation
+ </a></span></dt><dt><span class="section"><a href="ch01s09.html#ACL-v2ACLUserGuide">9.3.
+ v2 ACL User Guide
+ </a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ch04.html">4.
+ Managing the AMQP Messaging Broker
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch04.html#section-Managing-CPP-Broker">1. Managing the C++ Broker </a></span></dt><dd><dl><dt><span class="section"><a href="ch04.html#MgmtC-2B-2B-Usingqpidconfig">1.1.
+ Using qpid-config
+ </a></span></dt><dt><span class="section"><a href="ch04.html#MgmtC-2B-2B-Usingqpidroute">1.2.
+ Using qpid-route
+ </a></span></dt><dt><span class="section"><a href="ch04.html#MgmtC-2B-2B-Usingqpidtool">1.3.
+ Using qpid-tool
+ </a></span></dt><dt><span class="section"><a href="ch04.html#MgmtC-2B-2B-Usingqpidprintevents">1.4.
+ Using
+ qpid-printevents
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch04s02.html">2.
+ Qpid Management Framework
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch04s02.html#QpidManagementFramework-WhatIsQMF">2.1.
+ What Is QMF
+ </a></span></dt><dt><span class="section"><a href="ch04s02.html#QpidManagementFramework-GettingStartedwithQMF">2.2.
+ Getting
+ Started with QMF
+ </a></span></dt><dt><span class="section"><a href="ch04s02.html#QpidManagementFramework-QMFConcepts">2.3.
+ QMF Concepts
+ </a></span></dt><dt><span class="section"><a href="ch04s02.html#QpidManagementFramework-TheQMFProtocol">2.4.
+ The QMF
+ Protocol
+ </a></span></dt><dt><span class="section"><a href="ch04s02.html#QpidManagementFramework-HowtoWriteaQMFConsole">2.5.
+ How
+ to Write a QMF Console
+ </a></span></dt><dt><span class="section"><a href="ch04s02.html#QpidManagementFramework-HowtoWriteaQMFAgent">2.6.
+ How to
+ Write a QMF Agent
+ </a></span></dt></dl></dd><dt><span class="section"><a href="ch04s03.html">3.
+ QMF Python Console Tutorial
+ </a></span></dt><dd><dl><dt><span class="section"><a href="ch04s03.html#QMFPythonConsoleTutorial-PrerequisiteInstallQpidMessaging">3.1.
+ Prerequisite
+ - Install Qpid Messaging
+ </a></span></dt><dt><span class="section"><a href="ch04s03.html#QMFPythonConsoleTutorial-SynchronousConsoleOperations">3.2.
+ Synchronous
+ Console Operations
+ </a></span></dt><dt><span class="section"><a href="ch04s03.html#QMFPythonConsoleTutorial-AsynchronousConsoleOperations">3.3.
+ Asynchronous
+ Console Operations
+ </a></span></dt><dt><span class="section"><a href="ch04s03.html#QMFPythonConsoleTutorial-DiscoveringwhatKindsofObjectsareAvailable">3.4.
+ Discovering what Kinds of Objects are Available
+ </a></span></dt></dl></dd></dl></dd></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>1.1. <a href="ch01s04.html#id2914622">Transport Options for Federation</a></dt><dt>1.2. <a href="ch01s09.html#id2915541">ACL Support in Qpid Broker Versions</a></dt><dt>1.3. <a href="ch01s09.html#id2916046">Mapping ACL Traps</a></dt><dt>1.4. <a href="ch01s09.html#id2917552">Mapping Management Actions to ACL</a></dt><dt>2.1. <a href="ch02.html#id2916252">AMQP Version Support by Qpid Release</a></dt><dt>2.2. <a href="ch02s02.html#id2918316">AMQP Version Support - alternate format</a></dt><dt>3.1. <a href="ch03.html#id2918747">SASL Mechanism Support</a></dt><dt>3.2. <a href="ch03.html#id2918000">SASL Custom Mechanisms</a></dt><dt>4.1. <a href="ch04s02.html#id2919649">XML Attributes for QMF Properties and Statistics</a></dt><dt>4.2. <a href="ch04s02.html#id2921198">QMF Datatypes</a></dt><dt>4.3. <a href="ch04s02.html#id2921473">XML Schema Mapping for QMF Types
</a></dt><dt>4.4. <a href="ch04s03.html#id2922769">QMF Python Console Class Methods</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
Added: qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/pr01.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/pr01.html?rev=956304&view=auto
==============================================================================
--- qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/pr01.html (added)
+++ qpid/site/docs/books/0.7/AMQP-Messaging-Broker-CPP-Book/html/pr01.html Sat Jun 19 22:15:03 2010
@@ -0,0 +1,6 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title></title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="AMQP Messaging Broker (Implemented in C++)"><link rel="up" href="index.html" title="AMQP Messaging Broker (Implemented in C++)"><link rel="prev" href="index.html" title="AMQP Messaging Broker (Implemented in C++)"><link rel="next" href="ch01.html" title="Chapter 1. Running the AMQP Messaging Broker"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch01.html">Next</a></td></tr></table><hr></div><div class="preface"><div class="titlepage"></div><
p>Qpid provides two AMQP messaging brokers:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Implemented in C++ - high performance, low latency, and RDMA support.</p></li><li class="listitem"><p>Implemented in Java - Fully JMS compliant, runs on any Java platform.</p></li></ul></div><p>Both AMQP messaging brokers support clients in multiple
+ languages, as long as the messaging client and the messaging
+ broker use the same version of AMQP. See <a class="link" href="ch02.html" title="Chapter 2. AMQP compatibility">AMQP Compatibility</a> to see
+ which messaging clients work with each broker.</p><p>This manual contains information specific to the broker that is implemented in C++.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">AMQP Messaging Broker (Implemented in C++) </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 1.
+ Running the AMQP Messaging Broker
+ </td></tr></table></div></body></html>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org