[jboss-cvs] JBoss Messaging SVN: r6929 - trunk/docs/user-manual/en.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 20 10:18:33 EDT 2009


Author: ataylor
Date: 2009-05-20 10:18:32 -0400 (Wed, 20 May 2009)
New Revision: 6929

Modified:
   trunk/docs/user-manual/en/last-value-queues.xml
Log:
reformatted code and tables for last value queues doc

Modified: trunk/docs/user-manual/en/last-value-queues.xml
===================================================================
--- trunk/docs/user-manual/en/last-value-queues.xml	2009-05-20 14:16:03 UTC (rev 6928)
+++ trunk/docs/user-manual/en/last-value-queues.xml	2009-05-20 14:18:32 UTC (rev 6929)
@@ -1,53 +1,55 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <chapter id="last-value-queues">
-    <title>Last-Value Queues</title>
-       <para>Last-Value queues are special queues which discard any messages when
-        a newer message with the same value for a well-defined Last-Value property is put in the queue.
-        In other words, a Last-Value queue only retains the last value.</para>
-
-       <para>A typical example for Last-Value queue is for stock prices, where you are only 
-          interested by the latest value for a particular stock.</para>
-
-       <section>
-          <title>Configuring Last-Value Queues</title>
-          <para>Last-value queues are defined in the address-setting configuration:</para>
-          <programlisting>
+   <title>Last-Value Queues</title>
+   <para>Last-Value queues are special queues which discard any messages when a newer message with
+      the same value for a well-defined Last-Value property is put in the queue. In other words, a
+      Last-Value queue only retains the last value.</para>
+   <para>A typical example for Last-Value queue is for stock prices, where you are only interested
+      by the latest value for a particular stock.</para>
+   <section>
+      <title>Configuring Last-Value Queues</title>
+      <para>Last-value queues are defined in the address-setting configuration:</para>
+      <programlisting>
     &lt;address-setting match="jms.queue.lastValueQueue"&gt;
        &lt;last-value-queue&gt;true&lt;/last-value-queue&gt;
     &lt;/address-setting&gt;
             </programlisting>
-          <para>By default, <literal>last-value-queue</literal> is false. Address wildcards can be used
-          to configure Last-Value queues for a set of addresses (see <xref linkend="wildcard-syntax" />).</para>
-       </section>
+      <para>By default, <literal>last-value-queue</literal> is false. Address wildcards can be used
+         to configure Last-Value queues for a set of addresses (see <xref linkend="wildcard-syntax"
+         />).</para>
+   </section>
+   <section>
+      <title>Using Last-Value Property</title>
+      <para>The property name used to identify the last value is <literal>"_JBM_LVQ_NAME"</literal>
+         (or the constant <literal>MessageImpl.HDR_LAST_VALUE_NAME</literal> from the Core
+         API).</para>
+      <para>For example, if two messages with the same value for the Last-Value property are sent to
+         a Last-Value queue, only the latest message will be kept in the queue:</para>
+      <programlisting>
+     // send 1st message with Last-Value property set to STOCK_NAME
+     TextMessage message = 
+        session.createTextMessage("1st message with Last-Value property set");
+     message.setStringProperty("_JBM_LVQ_NAME", "STOCK_NAME");
+     producer.send(message);
 
-       <section>
-          <title>Using Last-Value Property</title>
-          <para>The property name used to identify the last value is <literal>"_JBM_LVQ_NAME"</literal>
-          (or the constant <literal>MessageImpl.HDR_LAST_VALUE_NAME</literal> from the Core API).</para>
-          <para>For example, if two messages with the same value for the Last-Value property are
-             sent to a Last-Value queue, only the latest message will be kept in the queue:</para>
-          <programlisting>
-             // send 1st message with Last-Value property set to STOCK_NAME
-             TextMessage message = session.createTextMessage("1st message with Last-Value property set");
-             message.setStringProperty("_JBM_LVQ_NAME", "STOCK_NAME");
-             producer.send(message);
-
-             // send 2nd message with Last-Value property set to STOCK_NAME             
-             message = session.createTextMessage("2nd message with Last-Value property set");
-             message.setStringProperty("_JBM_LVQ_NAME", "STOCK_NAME");
-             producer.send(message);
+     // send 2nd message with Last-Value property set to STOCK_NAME             
+     message = 
+        session.createTextMessage("2nd message with Last-Value property set");
+     message.setStringProperty("_JBM_LVQ_NAME", "STOCK_NAME");
+     producer.send(message);
              
-             ...
+      ...
              
-             // only the 2nd message will be received: it is the latest with the Last-Value property set
-             TextMessage messageReceived = (TextMessage)messageConsumer.receive(5000);
-             System.out.format("Received message: %s\n", messageReceived.getText());             
+     // only the 2nd message will be received: it is the latest with 
+the Last-Value property set
+     TextMessage messageReceived = (TextMessage)messageConsumer.receive(5000);
+     System.out.format("Received message: %s\n", messageReceived.getText());             
             </programlisting>
-       </section>
-          
-       <section>
-          <title>Example</title>
-          <para>The <ulink url="../../../../examples/jms/last-value-queue/readme.html"><literal>last-value-queue</literal> example</ulink> shows
-             how last value queues are configured and used with JMS.</para>
-       </section>
+   </section>
+   <section>
+      <title>Example</title>
+      <para>The <ulink url="../../../../examples/jms/last-value-queue/readme.html"><literal
+               >last-value-queue</literal> example</ulink> shows how last value queues are
+         configured and used with JMS.</para>
+   </section>
 </chapter>




More information about the jboss-cvs-commits mailing list