qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jr...@apache.org
Subject svn commit: r1236382 [20/22] - in /qpid/site/docs/books/trunk: ./ AMQP-Messaging-Broker-CPP-Book/ AMQP-Messaging-Broker-CPP-Book/html-single/ AMQP-Messaging-Broker-CPP-Book/html-single/css/ AMQP-Messaging-Broker-CPP-Book/html-single/images/ AMQP-Messag...
Date Thu, 26 Jan 2012 20:54:50 GMT
Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s02.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s02.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s02.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s02.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,31 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.2. A Simple Messaging Program in Python</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="next" href="ch02s03.html" title="2.3. A Simple Messaging Program in .NET C#"></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">2.2. A Simple Messaging Program in Python</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the 
 Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch02s03.html">Next</a></td></tr></table><hr></div><div class="section" title="2.2. A Simple Messaging Program in Python"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id360503"></a>2.2. A Simple Messaging Program in Python</h2></div></div></div><p>The following Python program shows how to create a
+        connection, create a session, send messages using a sender, and
+        receive messages using a receiver.</p><div class="example"><a name="id360513"></a><p class="title"><b>Example 2.2. "Hello world!" in Python</b></p><div class="example-contents"><pre lang="python" class="programlisting">
+import sys
+from qpid.messaging import *
+
+broker =  "localhost:5672" if len(sys.argv)&lt;2 else sys.argv[1]
+address = "amq.topic" if len(sys.argv)&lt;3 else sys.argv[2]
+
+connection = Connection(broker)
+
+try:
+  connection.open()  <a class="co" name="hello-python-open" href="ch02s02.html#callout-python-open">(1)</a>
+  session = connection.session()   <a class="co" name="hello-python-session" href="ch02s02.html#callout-python-session">(2)</a>
+
+  sender = session.sender(address)  <a class="co" name="hello-python-sender" href="ch02s02.html#callout-python-sender">(3)</a>
+  receiver = session.receiver(address)  <a class="co" name="hello-python-receiver" href="ch02s02.html#callout-python-receiver">(4)</a>
+
+  sender.send(Message("Hello world!"));
+
+  message = receiver.fetch(timeout=1)  <a class="co" name="hello-python-fetch" href="ch02s02.html#callout-python-fetch">(5)</a>
+  print message.content
+  session.acknowledge() <a class="co" name="hello-python-acknowledge" href="ch02s02.html#callout-python-acknowledge">(6)</a>
+
+except MessagingError,m:
+  print m
+finally:
+  connection.close()  <a class="co" name="hello-python-close" href="ch02s02.html#callout-python-close">(7)</a>
+</pre><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><p><a name="callout-python-open"></a><a href="#hello-python-open">(1)</a> </p></td><td valign="top" align="left"><p>Establishes the connection with the messaging broker.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-python-session"></a><a href="#hello-python-session">(2)</a> </p></td><td valign="top" align="left"><p>Creates a session object on which messages will be sent and received.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-python-receiver"></a><a href="#hello-python-receiver">(4)</a> </p></td><td valign="top" align="left"><p>Creates a receiver that receives messages from the given address.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-python-sender"></a><a href="#hello-python-sender">(3)</a> </p></td><td valign="top" align="left"><p>Creates a sender that send
 s to the given address.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-python-fetch"></a><a href="#hello-python-fetch">(5)</a> </p></td><td valign="top" align="left"><p>Receives the next message. The duration is optional, if omitted, will wait indefinitely for the next message.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-python-acknowledge"></a><a href="#hello-python-acknowledge">(6)</a> </p></td><td valign="top" align="left"><p>Acknowledges receipt of all fetched messages on
+	  the session. This informs the broker that the messages were
+	  transfered and processed by the client successfully.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-python-close"></a><a href="#hello-python-close">(7)</a> </p></td><td valign="top" align="left"><p>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</p></td></tr></table></div></div></div><br class="example-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Using the Qpid Messaging API </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.3. A Simple M
 essaging Program in .NET C#</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s03.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s03.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s03.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s03.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,48 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.3. A Simple Messaging Program in .NET C#</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s02.html" title="2.2. A Simple Messaging Program in Python"><link rel="next" href="section-addresses.html" title="2.4. Addresses"></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">2.3. A Simple Messaging Program in .NET C#</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s02.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messag
 ing API</th><td width="20%" align="right"> <a accesskey="n" href="section-addresses.html">Next</a></td></tr></table><hr></div><div class="section" title="2.3. A Simple Messaging Program in .NET C#"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id406092"></a>2.3. A Simple Messaging Program in .NET C#</h2></div></div></div><p>The following .NET C#
+	<sup>[<a name="id406100" href="#ftn.id406100" class="footnote">1</a>]</sup>
+	program shows how to create a connection,
+        create a session, send messages using a sender, and receive
+        messages using a receiver.
+      </p><div class="example"><a name="id406110"></a><p class="title"><b>Example 2.3. "Hello world!" in .NET C#</b></p><div class="example-contents"><pre lang="c++" class="programlisting">
+using System;
+using Org.Apache.Qpid.Messaging;  <a class="co" name="hello-csharp-using" href="ch02s03.html#callout-csharp-using">(1)</a>
+
+namespace Org.Apache.Qpid.Messaging {
+    class Program {
+        static void Main(string[] args) {
+            String broker = args.Length &gt; 0 ? args[0] : "localhost:5672";
+            String address = args.Length &gt; 1 ? args[1] : "amq.topic";
+
+            Connection connection = null;
+            try {
+                connection = new Connection(broker);
+                connection.Open();   <a class="co" name="hello-csharp-open" href="ch02s03.html#callout-csharp-open">(2)</a>
+                Session session = connection.CreateSession();   <a class="co" name="hello-csharp-session" href="ch02s03.html#callout-csharp-session">(3)</a>
+
+                Receiver receiver = session.CreateReceiver(address);   <a class="co" name="hello-csharp-receiver" href="ch02s03.html#callout-csharp-receiver">(4)</a>
+                Sender sender = session.CreateSender(address);   <a class="co" name="hello-csharp-sender" href="ch02s03.html#callout-csharp-sender">(5)</a>
+
+                sender.Send(new Message("Hello world!"));
+
+                Message message = new Message();
+                message = receiver.Fetch(DurationConstants.SECOND * 1);   <a class="co" name="hello-csharp-fetch" href="ch02s03.html#callout-csharp-fetch">(6)</a>
+                Console.WriteLine("{0}", message.GetContent());
+                session.Acknowledge();   <a class="co" name="hello-csharp-acknowledge" href="ch02s03.html#callout-csharp-acknowledge">(7)</a>
+
+                connection.Close();   <a class="co" name="hello-csharp-close" href="ch02s03.html#callout-csharp-close">(8)</a>
+            } catch (Exception e) {
+                Console.WriteLine("Exception {0}.", e);
+                if (null != connection)
+                    connection.Close();
+            }
+        }
+    }
+}
+
+</pre><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><p><a name="callout-csharp-using"></a><a href="#hello-csharp-using">(1)</a> </p></td><td valign="top" align="left"><p> Permits use of Org.Apache.Qpid.Messaging types and methods without explicit namespace qualification. Any .NET project must have a project reference to the assembly file <code class="literal">Org.Apache.Qpid.Messaging.dll</code> in order to obtain the definitions of the .NET Binding for Qpid Messaging namespace.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-csharp-open"></a><a href="#hello-csharp-open">(2)</a> </p></td><td valign="top" align="left"><p>Establishes the connection with the messaging broker.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-csharp-session"></a><a href="#hello-csharp-session">(3)</a> </p></td><td valign="top" align="left"><p>Creates a session object on whic
 h messages will be sent and received.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-csharp-receiver"></a><a href="#hello-csharp-receiver">(4)</a> </p></td><td valign="top" align="left"><p>Creates a receiver that receives messages from the given address.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-csharp-sender"></a><a href="#hello-csharp-sender">(5)</a> </p></td><td valign="top" align="left"><p>Creates a sender that sends to the given address.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-csharp-fetch"></a><a href="#hello-csharp-fetch">(6)</a> </p></td><td valign="top" align="left"><p>Receives the next message. The duration is optional, if omitted, will wait indefinitely for the next message.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-csharp-acknowledge"></a><a href="#hello-csharp-acknowledge">(7)</a> </p></td><td valign="top" align="left"><p>A
 cknowledges receipt of all fetched messages on the
+	  session. This informs the broker that the messages were
+	  transfered and processed by the client successfully.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a name="callout-csharp-close"></a><a href="#hello-csharp-close">(8)</a> </p></td><td valign="top" align="left"><p>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</p></td></tr></table></div></div></div><br class="example-break"><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a id="ftn.id406100" href="#id406100" class="para">1</a>] </sup>
+	    The .NET binding for the Qpid C++ Messaging API
+            applies to all .NET Framework managed code languages. C# was chosen
+            for illustration purposes only.
+	  </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="section-addresses.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.2. A Simple Messaging Program in Python </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.4. Addresses</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s08.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s08.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s08.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s08.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,37 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.8. Receiving Messages from Multiple Sources</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="acknowledgements.html" title="2.7. Acknowledging Received Messages"><link rel="next" href="ch02s09.html" title="2.9. Transactions"></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">2.8. Receiving Messages from Multiple Sources</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="acknowledgements.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the
  Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="ch02s09.html">Next</a></td></tr></table><hr></div><div class="section" title="2.8. Receiving Messages from Multiple Sources"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id408161"></a>2.8. Receiving Messages from Multiple Sources</h2></div></div></div><p>A receiver can only read from one source, but many
+      programs need to be able to read messages from many sources. In
+      the Qpid Messaging API, a program can ask a session for
+      the <span class="quote">“<span class="quote">next receiver</span>”</span>; that is, the receiver that is
+      responsible for the next available message. The following
+      examples show how this is done in C++, Python, and .NET C#.
+      </p><p>Note that to use this pattern you must enable prefetching
+      for each receiver of interest so that the broker will send
+      messages before a fetch call is made. See
+      <a class="xref" href="prefetch.html" title="2.6. Receiver Capacity (Prefetch)">Section 2.6, “Receiver Capacity (Prefetch)”</a> for more on this.</p><div class="example"><a name="id408185"></a><p class="title"><b>Example 2.12. Receiving Messages from Multiple Sources</b></p><div class="example-contents"><p>C++:</p><pre class="programlisting">
+Receiver receiver1 = session.createReceiver(address1);
+receiver1.setCapacity(10);
+Receiver receiver2 = session.createReceiver(address2);
+receiver2.setCapacity(10);
+
+Message message =  session.nextReceiver().fetch();
+std::cout &lt;&lt; message.getContent() &lt;&lt; std::endl;
+session.acknowledge(); // acknowledge message receipt
+	  </pre><p>Python:</p><pre class="programlisting">
+receiver1 = session.receiver(address1)
+receiver1.capacity = 10
+receiver2 = session.receiver(address)
+receiver2.capacity = 10
+message = session.next_receiver().fetch()
+print message.content
+session.acknowledge()
+	  </pre><p>.NET C#:</p><pre class="programlisting">
+Receiver receiver1 = session.CreateReceiver(address1);
+receiver1.Capacity = 10;
+Receiver receiver2 = session.CreateReceiver(address2);
+receiver2.Capacity = 10;
+
+Message message = new Message();
+message =  session.NextReceiver().Fetch();
+Console.WriteLine("{0}", message.GetContent());
+session.Acknowledge();
+	  </pre></div></div><br class="example-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="acknowledgements.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s09.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.7. Acknowledging Received Messages </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.9. Transactions</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s09.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s09.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s09.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s09.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,33 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.9. Transactions</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s08.html" title="2.8. Receiving Messages from Multiple Sources"><link rel="next" href="connection-options.html" title="2.10. Connection Options"></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">2.9. Transactions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s08.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="
 right"> <a accesskey="n" href="connection-options.html">Next</a></td></tr></table><hr></div><div class="section" title="2.9. Transactions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id408233"></a>2.9. Transactions</h2></div></div></div><p>Sometimes it is useful to be able to group messages
+      transfers - sent and/or received - on a session into atomic
+      grouping. This can be done be creating the session as
+      transactional. On a transactional session sent messages only
+      become available at the target address on commit. Likewise any
+      received and acknowledged messages are only discarded at their
+      source on commit
+
+      <sup>[<a name="id408248" href="#ftn.id408248" class="footnote">8</a>]</sup>
+
+      .</p><div class="example"><a name="id408255"></a><p class="title"><b>Example 2.13. Transactions</b></p><div class="example-contents"><p>C++:</p><pre class="programlisting">
+Connection connection(broker);
+Session session =  connection.createTransactionalSession();
+...
+if (smellsOk())
+   session.commit();
+else
+   session.rollback();
+   </pre><p>
+				.NET C#:
+			</p><pre class="programlisting">
+Connection connection = new Connection(broker);
+Session session =  connection.CreateTransactionalSession();
+...
+if (smellsOk())
+   session.Commit();
+else
+   session.Rollback();
+</pre></div></div><br class="example-break"><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a id="ftn.id408248" href="#id408248" class="para">8</a>] </sup>Note that this currently is only true for
+      messages received using a reliable mode
+      e.g. at-least-once. Messages sent by a broker to a receiver in
+      unreliable receiver will be discarded immediately regardless of
+      transctionality.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s08.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="connection-options.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.8. Receiving Messages from Multiple Sources </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.10. Connection Options</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s12.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s12.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s12.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s12.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,42 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.12. The Request / Response Pattern</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="section-Maps.html" title="2.11. Maps and Lists in Message Content"><link rel="next" href="ch02s13.html" title="2.13. Performance Tips"></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">2.12. The Request / Response Pattern</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="section-Maps.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging AP
 I</th><td width="20%" align="right"> <a accesskey="n" href="ch02s13.html">Next</a></td></tr></table><hr></div><div class="section" title="2.12. The Request / Response Pattern"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id409467"></a>2.12. The Request / Response Pattern</h2></div></div></div><p>Request / Response applications use the reply-to property,
+      described in <a class="xref" href="section-amqp0-10-mapping.html#table-amqp0-10-message-properties" title="Table 2.9. Mapping to AMQP 0-10 Message Properties">Table 2.9, “Mapping to AMQP 0-10 Message Properties”</a>, to allow a server
+      to respond to the client that sent a message. A server sets up a
+      service queue, with a name known to clients. A client creates a
+      private queue for the server's response, creates a message for a
+      request, sets the request's reply-to property to the address of
+      the client's response queue, and sends the request to the
+      service queue. The server sends the response to the address
+      specified in the request's reply-to property.
+      </p><div class="example"><a name="id409485"></a><p class="title"><b>Example 2.18. Request / Response Applications in C++</b></p><div class="example-contents"><p>This example shows the C++ code for a client and server
+	that use the request / response pattern.</p><p>The server creates a service queue and waits for a
+	message to arrive. If it receives a message, it sends a
+	message back to the sender.</p><pre class="programlisting">Receiver receiver = session.createReceiver("service_queue; {create: always}");
+
+Message request = receiver.fetch();
+const Address&amp;amp; address = request.getReplyTo(); // Get "reply-to" from request ...
+if (address) {
+  Sender sender = session.createSender(address); // ... send response to "reply-to"
+  Message response("pong!");
+  sender.send(response);
+  session.acknowledge();
+}
+     </pre><p>The client creates a sender for the service queue, and
+	also creates a response queue that is deleted when the
+	client closes the receiver for the response queue. In the C++
+	client, if the address starts with the character
+	<code class="literal">#</code>, it is given a unique name.</p><pre class="programlisting">
+Sender sender = session.createSender("service_queue");
+
+Address responseQueue("#response-queue; {create:always, delete:always}");
+Receiver receiver = session.createReceiver(responseQueue);
+
+Message request;
+request.setReplyTo(responseQueue);
+request.setContent("ping");
+sender.send(request);
+Message response = receiver.fetch();
+std::cout &lt;&lt; request.getContent() &lt;&lt; " -&gt; " &lt;&lt; response.getContent() &lt;&lt; std::endl;
+	  </pre><p>The client sends the string <code class="literal">ping</code> to
+	the server. The server sends the response
+	<code class="literal">pong</code> back to the same client, using the
+	<code class="varname">replyTo</code> property.</p></div></div><br class="example-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="section-Maps.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s13.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.11. Maps and Lists in Message Content </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.13. Performance Tips</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s13.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s13.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s13.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s13.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,22 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.13. Performance Tips</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s12.html" title="2.12. The Request / Response Pattern"><link rel="next" href="ch02s14.html" title="2.14. Cluster Failover"></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">2.13. Performance Tips</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s12.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <
 a accesskey="n" href="ch02s14.html">Next</a></td></tr></table><hr></div><div class="section" title="2.13. Performance Tips"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id409553"></a>2.13. Performance Tips</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Consider prefetching messages for receivers (see
+          <a class="xref" href="prefetch.html" title="2.6. Receiver Capacity (Prefetch)">Section 2.6, “Receiver Capacity (Prefetch)”</a>). This helps eliminate roundtrips
+          and increases throughput. Prefetch is disabled by default,
+          and enabling it is the most effective means of improving
+          throughput of received messages.</p></li><li class="listitem"><p>Send messages asynchronously. Again, this helps
+          eliminate roundtrips and increases throughput. The C++ and
+          .NET clients send asynchronously by default, however the
+          python client defaults to synchronous sends.  </p></li><li class="listitem"><p>Acknowledge messages in batches (see
+          <a class="xref" href="acknowledgements.html" title="2.7. Acknowledging Received Messages">Section 2.7, “Acknowledging Received Messages”</a>). Rather than
+          acknowledging each message individually, consider issuing
+          acknowledgements after n messages and/or after a particular
+          duration has elapsed.</p></li><li class="listitem"><p>Tune the sender capacity (see
+          <a class="xref" href="replay.html" title="2.5. Sender Capacity and Replay">Section 2.5, “Sender Capacity and Replay”</a>). If the capacity is too low the
+          sender may block waiting for the broker to confirm receipt
+          of messages, before it can free up more capacity.</p></li><li class="listitem"><p>If you are setting a reply-to address on messages
+          being sent by the c++ client, make sure the address type is
+          set to either queue or topic as appropriate. This avoids the
+          client having to determine which type of node is being
+          refered to, which is required when hanling reply-to in AMQP
+          0-10. </p></li><li class="listitem"><p>For latency sensitive applications, setting tcp-nodelay
+	      on qpidd and on client connections can help reduce the
+	      latency.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s12.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s14.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.12. The Request / Response Pattern </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.14. Cluster Failover</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s14.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s14.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s14.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s14.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,34 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.14. Cluster Failover</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s13.html" title="2.13. Performance Tips"><link rel="next" href="ch02s15.html" title="2.15. Logging"></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">2.14. Cluster Failover</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s13.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesskey="n" href="c
 h02s15.html">Next</a></td></tr></table><hr></div><div class="section" title="2.14. Cluster Failover"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id409626"></a>2.14. Cluster Failover</h2></div></div></div><p>The messaging broker can be run in clustering mode, which provides high reliability through replicating state between brokers in the cluster. If one broker in a cluster fails, clients can choose another broker in the cluster and continue their work. Each broker in the cluster also advertises the addresses of all known brokers
+
+<sup>[<a name="id409636" href="#ftn.id409636" class="footnote">11</a>]</sup>
+
+. A client can use this information to dynamically keep the list of reconnection urls up to date.</p><p>In C++, the <code class="classname">FailoverUpdates</code> class provides this functionality:</p><div class="example"><a name="id409649"></a><p class="title"><b>Example 2.19. Tracking cluster membership</b></p><div class="example-contents"><p>In C++:</p><pre class="programlisting">
+#include &lt;qpid/messaging/FailoverUpdates.h&gt;
+...
+Connection connection("localhost:5672");
+connection.setOption("reconnect", true);
+try {
+    connection.open();
+    std::auto_ptr&lt;FailoverUpdates&gt; updates(new FailoverUpdates(connection));
+
+	</pre><p>In python:</p><pre class="programlisting">
+import qpid.messaging.util
+...
+connection = Connection("localhost:5672")
+connection.reconnect = True
+try:
+  connection.open()
+  auto_fetch_reconnect_urls(connection)
+
+	</pre><p>
+				In .NET C#:
+			</p><pre class="programlisting">
+using Org.Apache.Qpid.Messaging;
+...
+connection = new Connection("localhost:5672");
+connection.SetOption("reconnect", true);
+try {
+  connection.Open();
+  FailoverUpdates failover = new FailoverUpdates(connection);
+
+</pre></div></div><br class="example-break"><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a id="ftn.id409636" href="#id409636" class="para">11</a>] </sup>This is done via the amq.failover exchange in AMQP 0-10</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s13.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s15.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.13. Performance Tips </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.15. Logging</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s15.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s15.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s15.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch02s15.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,26 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.15. Logging</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="ch02.html" title="Chapter 2. Using the Qpid Messaging API"><link rel="prev" href="ch02s14.html" title="2.14. Cluster Failover"><link rel="next" href="section-amqp0-10-mapping.html" title="2.16. The AMQP 0-10 mapping"></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">2.15. Logging</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s14.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Using the Qpid Messaging API</th><td width="20%" align="right"> <a accesske
 y="n" href="section-amqp0-10-mapping.html">Next</a></td></tr></table><hr></div><div class="section" title="2.15. Logging"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id409694"></a>2.15. Logging</h2></div></div></div><p>To simplify debugging, Qpid provides a logging facility
+      that prints out messaging events.</p><div class="section" title="2.15.1. Logging in C++"><div class="titlepage"><div><div><h3 class="title"><a name="id409703"></a>2.15.1. Logging in C++</h3></div></div></div><p>
+				The Qpidd broker and C++ clients can both use environment variables to enable logging. Linux and Windows systems use the same named environment variables and values.
+			 </p><p>Use QPID_LOG_ENABLE to set the level of logging you are interested in (trace, debug, info, notice, warning, error, or critical):
+			</p><pre class="screen">
+export QPID_LOG_ENABLE="warning+"
+</pre><p>
+				The Qpidd broker and C++ clients use QPID_LOG_OUTPUT to determine where logging output should be sent. This is either a file name or the special values stderr, stdout, or syslog:
+			</p><pre class="screen">
+export QPID_LOG_TO_FILE="/tmp/myclient.out"
+</pre><p>
+				From a Windows command prompt, use the following command format to set the environment variables:
+			</p><pre class="screen">
+set QPID_LOG_ENABLE=warning+
+set QPID_LOG_TO_FILE=D:\tmp\myclient.out
+</pre></div><div class="section" title="2.15.2. Logging in Python"><div class="titlepage"><div><div><h3 class="title"><a name="id409744"></a>2.15.2. Logging in Python</h3></div></div></div><p>
+			The Python client library supports logging using the standard Python logging module. The easiest way to do logging is to use the <span class="command"><strong>basicConfig()</strong></span>, which reports all warnings and errors:
+		</p><pre class="programlisting">from logging import basicConfig
+basicConfig()
+</pre><p>
+			Qpidd also provides a convenience method that makes it easy to specify the level of logging desired. For instance, the following code enables logging at the <span class="command"><strong>DEBUG</strong></span> level:
+		</p><pre class="programlisting">from qpid.log import enable, DEBUG
+enable("qpid.messaging.io", DEBUG)
+</pre><p>
+			For more information on Python logging, see <a class="ulink" href="http://docs.python.org/lib/node425.html" target="_top">http://docs.python.org/lib/node425.html</a>. For more information on Qpid logging, use <span class="command"><strong>$ pydoc qpid.log</strong></span>.
+		</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s14.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="section-amqp0-10-mapping.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.14. Cluster Failover </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.16. The AMQP 0-10 mapping</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch03s03.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch03s03.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch03s03.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch03s03.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,8 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>3.3. Java JMS Message Properties</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="QpidJMS.html" title="Chapter 3. Using the Qpid JMS client"><link rel="prev" href="QpidJNDI.html" title="3.2. Apache Qpid JNDI Properties for AMQP Messaging"><link rel="next" href="section-JMS-MapMessage.html" title="3.4. JMS MapMessage Types"></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.3. Java JMS Message Properties</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="QpidJNDI.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using the Qpi
 d JMS client</th><td width="20%" align="right"> <a accesskey="n" href="section-JMS-MapMessage.html">Next</a></td></tr></table><hr></div><div class="section" title="3.3. Java JMS Message Properties"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id411374"></a>3.3. Java JMS Message Properties</h2></div></div></div><p>The following table shows how Qpid Messaging API message
+        properties are mapped to AMQP 0-10 message properties and
+        delivery properties. In this table <code class="varname">msg</code>
+        refers to the Message class defined in the Qpid Messaging API,
+        <code class="varname">mp</code> refers to an AMQP 0-10
+        <code class="varname">message-properties</code> struct, and
+        <code class="varname">dp</code> refers to an AMQP 0-10
+        <code class="varname">delivery-properties</code> struct.</p><div class="table"><a name="id411400"></a><p class="title"><b>Table 3.4. Java JMS Mapping to AMQP 0-10 Message Properties</b></p><div class="table-contents"><table summary="Java JMS Mapping to AMQP 0-10 Message Properties" border="1"><colgroup><col><col></colgroup><thead><tr><th>Java JMS Message Property</th><th>AMQP 0-10 Property<sup>[<a name="id411420" href="#ftn.id411420" class="footnote">a</a>]</sup></th></tr></thead><tbody><tr><td>JMSMessageID</td><td>mp.message_id</td></tr><tr><td>qpid.subject<sup>[<a name="id411451" href="#ftn.id411451" class="footnote">b</a>]</sup></td><td>mp.application_headers["qpid.subject"]</td></tr><tr><td>JMSXUserID</td><td>mp.user_id</td></tr><tr><td>JMSReplyTo</td><td>mp.reply_to<sup>[<a name="id411474" href="#ftn.id411474" class="footnote">c</a>]</sup></td></tr><tr><td>JMSCorrelationID</td><td>mp.correlation_id</td></tr><tr><td>JMSDeliveryMode</td><td>dp.delivery_mode<
 /td></tr><tr><td>JMSPriority</td><td>dp.priority</td></tr><tr><td>JMSExpiration</td><td>dp.ttl<sup>[<a name="id411513" href="#ftn.id411513" class="footnote">d</a>]</sup></td></tr><tr><td>JMSRedelivered</td><td>dp.redelivered</td></tr><tr><td>JMS Properties</td><td>mp.application_headers</td></tr><tr><td>JMSType</td><td>mp.content_type</td></tr></tbody><tbody class="footnotes"><tr><td colspan="2"><div class="footnote"><p><sup>[<a id="ftn.id411420" href="#id411420" class="para">a</a>] </sup>In these entries, <code class="literal">mp</code> refers to an AMQP message property, and <code class="literal">dp</code> refers to an AMQP delivery property.</p></div><div class="footnote"><p><sup>[<a id="ftn.id411451" href="#id411451" class="para">b</a>] </sup>This is a custom JMS property, set automatically by the Java JMS client implementation.</p></div><div class="footnote"><p><sup>[<a id="ftn.id411474" href="#id411474" class="para">c</a>] </sup>The reply_to is converted from the proto
 col representation into an address.</p></div><div class="footnote"><p><sup>[<a id="ftn.id411513" href="#id411513" class="para">d</a>] </sup>JMSExpiration = dp.ttl + currentTime</p></div></td></tr></tbody></table></div></div><br class="table-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="QpidJNDI.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="QpidJMS.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="section-JMS-MapMessage.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.2. Apache Qpid JNDI Properties for AMQP Messaging </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 3.4. JMS MapMessage Types</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch03s06.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch03s06.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch03s06.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch03s06.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,20 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>3.6. Configuring the JMS Client</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="QpidJMS.html" title="Chapter 3. Using the Qpid JMS client"><link rel="prev" href="section-JMS-Logging.html" title="3.5. JMS Client Logging"><link rel="next" href="QpidWCF.html" title="Chapter 4. Using the Qpid WCF client"></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.6. Configuring the JMS Client</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="section-JMS-Logging.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using the Qpid JMS cli
 ent</th><td width="20%" align="right"> <a accesskey="n" href="QpidWCF.html">Next</a></td></tr></table><hr></div><div class="section" title="3.6. Configuring the JMS Client"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id411777"></a>3.6. Configuring the JMS Client</h2></div></div></div><p>The Qpid JMS Client allows several configuration options to customize it's behaviour at different levels of granualarity.</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
+            JVM level using JVM arguments : Configuration that affects all connections, sessions, consumers and producers created within that JVM.
+	      </p><p>Ex. <code class="varname">-Dmax_prefetch=1000</code> property specifies the message credits to use.</p></li><li class="listitem"><p>
+            Connection level using Connection/Broker properties : Affects the respective connection and sessions, consumers and produces created by that connection.
+	      </p><p>Ex. <code class="varname">amqp://guest:guest@test/test?max_prefetch='1000'
+    &amp;brokerlist='tcp://localhost:5672'
+</code> property specifies the message credits to use. This overrides any value specified via the JVM argument <code class="varname">max_prefetch</code>.</p><p>Please refer to the <a class="xref" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Section 3.2.2, “Connection URLs”</a> section for a complete list of all properties and how to use them.</p></li><li class="listitem"><p>
+            Destination level using Addressing options : Affects the producer(s) and consumer(s) created using the respective destination.
+	      </p><p>Ex. <code class="varname">my-queue; {create: always, link:{capacity: 10}}</code>, where <code class="varname">capacity</code> option specifies the message credits to use. This overrides any connection level configuration.</p><p>Please refer to the <a class="xref" href="section-addresses.html" title="2.4. Addresses">Section 2.4, “Addresses”</a> section for a complete understanding of addressing and it's various options.</p></li></ul></div><p>Some of these config options are available at all three levels (Ex. <code class="varname">max_prefetch</code>), while others are available only at JVM or connection level.</p><div class="section" title="3.6.1. Qpid JVM Arguments"><div class="titlepage"><div><div><h3 class="title"><a name="id411866"></a>3.6.1. Qpid JVM Arguments</h3></div></div></div><div class="table"><a name="id411872"></a><p class="title"><b>Table 3.6. Config Options For Connection Behaviour</b></p><div class="table-contents"><t
 able summary="Config Options For Connection Behaviour" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.amqp.version</td><td>string</td><td>0-10</td><td><p>Sets the AMQP version to be used - currently supports one of {0-8,0-9,0-91,0-10}.</p><p>The client will begin negotiation at the specified version and only negotiate downwards if the Broker does not support the specified version.</p></td></tr><tr><td>qpid.heartbeat</td><td>int</td><td>120 (secs)</td><td>The heartbeat interval in seconds. Two consective misssed heartbeats will result in the connection timing out.<p>This could also be set per connection as well (see connection paramters).</p></td></tr><tr><td>ignore_setclientID</td><td>boolean</td><td>false</td><td>If a client ID is specified in the connection URL it's used or else an ID is generated. If an ID is specified after it's been set Qpid will
  throw an exception. <p>Setting this property to 'true' will disable that check and allow you to set a client ID of your choice later on.</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id411968"></a><p class="title"><b>Table 3.7. Config Options For Session Behaviour</b></p><div class="table-contents"><table summary="Config Options For Session Behaviour" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.session.command_limit</td><td>int</td><td>65536</td><td>Limits the # of unacked commands</td></tr><tr><td>qpid.session.byte_limit</td><td>int</td><td>1048576</td><td>Limits the # of unacked commands in terms of bytes</td></tr><tr><td>qpid.use_legacy_map_message</td><td>boolean</td><td>false</td><td><p>If set will use the old map message encoding. By default the Map messages are encoded using the 0-10 map 
 encoding.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id412055"></a><p class="title"><b>Table 3.8. Config Options For Consumer Behaviour</b></p><div class="table-contents"><table summary="Config Options For Consumer Behaviour" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>max_prefetch</td><td>int</td><td>500</td><td>Maximum number of messages to credits. <p>This could also be set per connection (see connection paramters) or per destination (see the <code class="varname">capacity</code> option under link properties in addressing).</p></td></tr><tr><td>qpid.session.max_ack_delay</td><td>long</td><td>1000 (ms)</td><td><p>Timer interval to flush message acks in buffer when using AUTO_ACK and DUPS_OK.</p> <p>When using the abov
 e ack modes, message acks are batched and sent if one of the following conditions are met (which ever happens first).
+                            </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>When the ack timer fires.</p></li><li class="listitem"><p>if un_acked_msg_count &gt; max_prefetch/2.</p></li></ul></div><p>
+                        </p>
+                        <p>The ack timer can be disabled by setting it to 0.</p>
+                  </td></tr><tr><td>sync_ack</td><td>boolean</td><td>false</td><td><p>If set, each message will be acknowledged synchronously. When using AUTO_ACK mode, you need to set this to "true", in order to get the correct behaviour as described by the JMS spec.</p><p>This is set to false by default for performance reasons, therefore by default AUTO_ACK behaves similar to DUPS_OK.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id412174"></a><p class="title"><b>Table 3.9. Config Options For Producer Behaviour</b></p><div class="table-contents"><table summary="Config Options For Producer Behaviour" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>sync_publish</td><td>string</td><td>"" (disabled)</td><td><p>If one of {persist
 ent|all} is set then persistent messages or all messages will be sent synchronously.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id412229"></a><p class="title"><b>Table 3.10. Config Options For Threading</b></p><div class="table-contents"><table summary="Config Options For Threading" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.thread_factory</td><td>string</td><td>org.apache.qpid.thread.DefaultThreadFactory</td><td><p>Specifies the thread factory to use.</p><p>If using a real time JVM, you need to set the above property to <code class="varname">org.apache.qpid.thread.RealtimeThreadFactory</code>.</p></td></tr><tr><td>qpid.rt_thread_priority</td><td>int</td><td>20</td><td><p>Specifies the priority (1-99) for Real tim
 e threads created by the real time thread factory.</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id412304"></a><p class="title"><b>Table 3.11. Config Options For I/O</b></p><div class="table-contents"><table summary="Config Options For I/O" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.transport</td><td>string</td><td>org.apache.qpid.transport.network.io.IoNetworkTransport</td><td><p>The transport implementation to be used.</p><p>A user could specify an alternative transport mechanism that implements the <code class="varname">org.apache.qpid.transport.network.NetworkTransport</code> interface.</p></td></tr><tr><td>qpid.sync_op_timeout</td><td>long</td><td>60000</td><td><p>The length of time (in milliseconds) to wait for a synchronous operation to complete.</p><p>For compatibility with older clients
 , the synonym <code class="varname">amqj.default_syncwrite_timeout</code> is supported.</p></td></tr><tr><td>amqj.tcp_nodelay</td><td>boolean</td><td>false</td><td><p>Sets the TCP_NODELAY property of the underlying socket.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id412405"></a><p class="title"><b>Table 3.12. Config Options For Security</b></p><div class="table-contents"><table summary="Config Options For Security" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.sasl_mechs</td><td>string</td><td>PLAIN</td><td><p>The SASL mechanism to be used. More than one could be specified as a comma separated list.</p><p>We currently support the following mechanisms {PLAIN | GSSAPI | EXTERNAL}.</p><p>This could also be set per conn
 ection as well (see connection paramters).</p></td></tr><tr><td>qpid.sasl_protocol</td><td>string</td><td>AMQP</td><td><p>When using GSSAPI as the SASL mechanism, <code class="varname">sasl_protocol</code> must be set to the principal for the qpidd broker, e.g. <code class="varname">qpidd</code>.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr><tr><td>qpid.sasl_server_name</td><td>string</td><td>localhost</td><td><p>When using GSSAPI as the SASL mechanism, <code class="varname">sasl_server</code> must be set to the host for the SASL server, e.g. <code class="varname">example.com</code>.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id412516"></a><p class="title"><b>Table 3.13. Config Options For Security - Standard JVM properties needed when using GSSAPI as the SASL mechanism.<sup>[<a name="id412521"
  href="#ftn.id412521" class="footnote">a</a>]</sup></b></p><div class="table-contents"><table summary="Config Options For Security - Standard JVM properties needed when using GSSAPI as the SASL mechanism.Please refer to the Java security documentation for a complete understanding of the above properties." border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>javax.security.auth.useSubjectCredsOnly</td><td>boolean</td><td>true</td><td><p>If set to 'false', forces the SASL GASSPI client to obtain the kerberos credentials explicitly instead of obtaining from the "subject" that owns the current thread.</p></td></tr><tr><td>java.security.auth.login.config</td><td>string</td><td> </td><td><p>Specifies the jass configuration file.</p><p><code class="varname">Ex-Djava.security.auth.login.config=myjas.conf</code>
+</p><p>Here is the sample myjas.conf JASS configuration file: </p><pre class="programlisting">
+
+    com.sun.security.jgss.initiate {
+        com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true;
+    };
+
+</pre></td></tr></tbody><tbody class="footnotes"><tr><td colspan="4"><div class="footnote"><p><sup>[<a id="ftn.id412521" href="#id412521" class="para">a</a>] </sup>Please refer to the Java security documentation for a complete understanding of the above properties.</p></div></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id412602"></a><p class="title"><b>Table 3.14. Config Options For Security - Using SSL for securing connections or using EXTERNAL as the SASL mechanism.</b></p><div class="table-contents"><table summary="Config Options For Security - Using SSL for securing connections or using EXTERNAL as the SASL mechanism." border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.ssl_timeout</td><td>long</td><td>60000</td><td><p>Timeout value used by the Java SSL engine when waiting on operations.</p></td></tr><t
 r><td>qpid.ssl.keyStoreCertType</td><td>string</td><td>SunX509</td><td><p>The certificate type.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr><tr><td>qpid.ssl.trustStoreCertType</td><td>string</td><td>SunX509</td><td><p>The certificate type.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id412694"></a><p class="title"><b>Table 3.15. Config Options For Security - Standard JVM properties needed when Using SSL for securing connections or using EXTERNAL as the SASL mechanism.<sup>[<a name="id412700" href="#ftn.id412700" class="footnote">a</a>]</sup></b></p><div class="table-contents"><table summary="Config Options For Security - Standard JVM properties needed when Using SSL for securing connections or using EXTERNAL as the SASL mechanism.Qpid allows you to have per connection key and trust stores if req
 uired. If specified per connection, the JVM arguments are ignored." border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>javax.net.ssl.keyStore</td><td>string</td><td>jvm default</td><td><p>Specifies the key store path.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr><tr><td>javax.net.ssl.keyStorePassword</td><td>string</td><td>jvm default</td><td><p>Specifies the key store password.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr><tr><td>javax.net.ssl.trustStore</td><td>string</td><td>jvm default</td><td><p>Specifies the trust store path.</p><p>This could also be set per connection as well (see connection paramters).</p></td></tr><tr><td>javax.net.ssl.trustStorePassword</td><td>string</td><td>jvm default</td><td><p>Specifies the trust store password.</p><p>This could also 
 be set per connection as well (see connection paramters).</p></td></tr></tbody><tbody class="footnotes"><tr><td colspan="4"><div class="footnote"><p><sup>[<a id="ftn.id412700" href="#id412700" class="para">a</a>] </sup>Qpid allows you to have per connection key and trust stores if required. If specified per connection, the JVM arguments are ignored.</p></div></td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="section-JMS-Logging.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="QpidJMS.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="QpidWCF.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.5. JMS Client Logging </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapt
 er 4. Using the Qpid WCF client</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s02.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s02.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s02.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s02.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,11 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>4.2. Endpoints</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="QpidWCF.html" title="Chapter 4. Using the Qpid WCF client"><link rel="prev" href="QpidWCF.html" title="Chapter 4. Using the Qpid WCF client"><link rel="next" href="ch04s03.html" title="4.3. Message Headers"></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">4.2. Endpoints</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="QpidWCF.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Using the Qpid WCF client</th><td width="20%" align="right"> <a accesskey="n" hr
 ef="ch04s03.html">Next</a></td></tr></table><hr></div><div class="section" title="4.2. Endpoints"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id413053"></a>4.2. Endpoints</h2></div></div></div><p>In Qpid 0.6 the WCF Endpoints map to simple AMQP 0-10
+      exchanges (IOutputChannel) or AMQP 0-10 queues (IInputChannel).
+      The format for an IOutputChannel is</p><pre class="programlisting">
+  "amqp:amq.direct" or "amqp:my_exchange?routingkey=my_routing_key"
+</pre><p>and for an IInputChannel is</p><pre class="programlisting">
+  "amqp:my_queue"
+</pre><p>The routing key is in fact a default value associated with
+      the particular channel.  Outgoing messages can always have their
+      routing key uniquely set.</p><p>If the respective queue or exchange doesn't exist, an exception
+      is thrown when opening the channel.  Queues and exchanges can be
+      created and configured using qpid-config.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="QpidWCF.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="QpidWCF.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Using the Qpid WCF client </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 4.3. Message Headers</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s03.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s03.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s03.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s03.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,19 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>4.3. Message Headers</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="QpidWCF.html" title="Chapter 4. Using the Qpid WCF client"><link rel="prev" href="ch04s02.html" title="4.2. Endpoints"><link rel="next" href="ch04s04.html" title="4.4. Security"></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">4.3. Message Headers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s02.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Using the Qpid WCF client</th><td width="20%" align="right"> <a accesskey="n" href="ch04s04.html">Ne
 xt</a></td></tr></table><hr></div><div class="section" title="4.3. Message Headers"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id413088"></a>4.3. Message Headers</h2></div></div></div><p>AMQP specific message headers can be set on or retrieved
+      from the ServiceModel.Channels.Message using the AmqpProperties
+      type.</p><p>For example, on output:</p><pre class="programlisting">
+AmqpProperties props = new AmqpProperties();
+props.Durable = true;
+props.PropertyMap.Add("my_custom_header", new AmqpString("a custom value"));
+Message msg = Message.CreateMessage(args);
+msg.Properties.Add("AmqpProperties", amqpProperties);
+outputChannel.Send(msg);
+</pre><p>On input the headers can be accessed from the Message or extracted
+      from the operation context</p><pre class="programlisting">
+public void SayHello(string greeting)
+{
+  AmqpProperties props = (AmqpProperties) OperationContext.
+  Current.IncomingMessageProperties["AmqpProperties"];
+  AmqpString extra = (AmqpString) props.PropertyMap["my_custom_header"];
+  Console.WriteLine("Service received: {0} and {1}", greeting, extra);
+}
+</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="QpidWCF.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.2. Endpoints </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 4.4. Security</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s04.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s04.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s04.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s04.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,21 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>4.4. Security</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="QpidWCF.html" title="Chapter 4. Using the Qpid WCF client"><link rel="prev" href="ch04s03.html" title="4.3. Message Headers"><link rel="next" href="ch04s05.html" title="4.5. Transactions"></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">4.4. Security</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s03.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Using the Qpid WCF client</th><td width="20%" align="right"> <a accesskey="n" href="ch04s05.html">Next</
 a></td></tr></table><hr></div><div class="section" title="4.4. Security"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id413117"></a>4.4. Security</h2></div></div></div><p>To engage TLS/SSL:</p><pre class="programlisting">
+binding.Security.Mode = AmqpSecurityMode.Transport;
+binding.Security.Transport.UseSSL = true;
+binding.BrokerPort = 5671;
+</pre><p>Currently the WCF client only provides SASL PLAIN (i.e. username and
+      password) authentication.  To provide a username and password, you can
+      set the DefaultAmqpCredential value in the binding.  This value can be
+      overridden or set for a binding's channel factories and listeners,
+      either by setting the ClientCredentials as a binding parameter, or by
+      using an AmqpCredential as a binding parameter.  The search order for
+      credentials is the AmqpCredential binding parameter, followed by the
+      ClientCredentials (unless IgnoreEndpointClientCredentials has been
+      set), and finally defaulting to the DefaultAmqpCredential of the
+      binding itself.  Here is a sample using ClientCredentials:</p><pre class="programlisting">
+ClientCredentials credentials = new ClientCredentials();
+credentials.UserName.UserName = "guest";
+credentials.UserName.Password = "guest";
+bindingParameters = new BindingParameterCollection();
+bindingParameters.Add(credentials);
+readerFactory = binding.BuildChannelFactory&lt;IInputChannel&gt;(bindingParameters);
+</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="QpidWCF.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.3. Message Headers </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 4.5. Transactions</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s05.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s05.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s05.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch04s05.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,43 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>4.5. Transactions</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="QpidWCF.html" title="Chapter 4. Using the Qpid WCF client"><link rel="prev" href="ch04s04.html" title="4.4. Security"><link rel="next" href="ch05.html" title="Chapter 5. The .NET Binding for the C++ Messaging Client"></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">4.5. Transactions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Using the Qpid WCF client</th><td width="20%" align="right"> <a 
 accesskey="n" href="ch05.html">Next</a></td></tr></table><hr></div><div class="section" title="4.5. Transactions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id413151"></a>4.5. Transactions</h2></div></div></div><p>The WCF channel provides a transaction resource manager
+      module and a recovery module that together provide distributed
+      transaction support with one-phase optimization.  Some
+      configuration is required on Windows machines to enable
+      transaction support (see your installation notes or top level
+      ReadMe.txt file for instructions).  Once properly configured,
+      the Qpid WCF channel acts as any other System.Transactions aware
+      resource, capable of participating in explicit or implicit
+      transactions.</p><p>Server code:</p><pre class="programlisting">
+[OperationBehavior(TransactionScopeRequired = true,
+                   TransactionAutoComplete = true)]
+
+public void SayHello(string greeting)
+{
+  // increment ExactlyOnceReceived counter on DB
+
+  // Success: transaction auto completes:
+}
+</pre><p>Because this operation involves two transaction resources, the
+      database and the AMQP message broker, this operates as a full two
+      phase commit transaction managed by the Distributed Transaction
+      Coordinator service.  If the transaction proceeds without error,
+      both ExactlyOnceReceived is incremented in the database and the AMQP
+      message is consumed from the broker.  Otherwise, ExactlyOnceReceived is
+      unchanged and AMQP message is returned to its queue on the broker.</p><p>For the client code a few changes are made to the non-transacted
+      example.  For "exactly once" semantics, we set the AMQP "Durable"
+      message property and enclose the transacted activities in a
+      TransactionScope:</p><pre class="programlisting">
+AmqpProperties myDefaults = new AmqpProperties();
+myDefaults.Durable = true;
+amqpBinding.DefaultMessageProperties = myDefaults;
+ChannelFactory&lt;IHelloService&gt; channelFactory =
+new ChannelFactory&lt;IHelloService&gt;(amqpBinding, clientEndpoint);
+IHelloService clientProxy = channelFactory.CreateChannel();
+
+using (TransactionScope ts = new TransactionScope())
+{
+   AmqpProperties amqpProperties = new AmqpProperties();
+   clientProxy.SayHello("Greetings from WCF client");
+   // increment ExactlyOnceSent counter on DB
+   ts.Complete();
+}
+</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="QpidWCF.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.4. Security </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. The .NET Binding for the C++ Messaging Client</td></tr></table></div></body></html>

Added: qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch05.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch05.html?rev=1236382&view=auto
==============================================================================
--- qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch05.html (added)
+++ qpid/site/docs/books/trunk/Programming-In-Apache-Qpid/html/ch05.html Thu Jan 26 20:54:43 2012
@@ -0,0 +1,41 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 5. The .NET Binding for the C++ Messaging Client</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Programming in Apache Qpid"><link rel="up" href="index.html" title="Programming in Apache Qpid"><link rel="prev" href="ch04s05.html" title="4.5. Transactions"><link rel="next" href="ch05s02.html" title="5.2. .NET Binding for the C++ Messaging Client Examples"></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">Chapter 5. The .NET Binding for the C++ Messaging Client</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s05.html">Prev</a> </td><th width="60%" align="center"> </th><td wi
 dth="20%" align="right"> <a accesskey="n" href="ch05s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 5. The .NET Binding for the C++ Messaging Client"><div class="titlepage"><div><div><h2 class="title"><a name="id413198"></a>Chapter 5. The .NET Binding for the C++ Messaging Client</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch05.html#id413214">5.1. .NET Binding for the C++ Messaging Client Component Architecture</a></span></dt><dt><span class="section"><a href="ch05s02.html">5.2. .NET Binding for the C++ Messaging Client Examples</a></span></dt><dt><span class="section"><a href="ch05s03.html">5.3. .NET Binding Class Mapping to Underlying C++ Messaging API</a></span></dt><dd><dl><dt><span class="section"><a href="ch05s03.html#id413748">5.3.1. .NET Binding for the C++ Messaging API Class: Address</a></span></dt><dt><span class="section"><a href="ch05s03.html#id41433
 8">5.3.2. .NET Binding for the C++ Messaging API Class: Connection</a></span></dt><dt><span class="section"><a href="ch05s03.html#id414964">5.3.3. .NET Binding for the C++ Messaging API Class: Duration</a></span></dt><dt><span class="section"><a href="ch05s03.html#id415375">5.3.4. .NET Binding for the C++ Messaging API Class: FailoverUpdates</a></span></dt><dt><span class="section"><a href="ch05s03.html#id415551">5.3.5. .NET Binding for the C++ Messaging API Class: Message</a></span></dt><dt><span class="section"><a href="ch05s03.html#id416703">5.3.6. .NET Binding for the C++ Messaging API Class: Receiver</a></span></dt><dt><span class="section"><a href="ch05s03.html#id417332">5.3.7. .NET Binding for the C++ Messaging API Class: Sender</a></span></dt><dt><span class="section"><a href="ch05s03.html#id417803">5.3.8. .NET Binding for the C++ Messaging API Class: Session</a></span></dt><dt><span class="section"><a href="ch05s03.html#id418739">5.3.9. .NET Binding Class: SessionRe
 ceiver</a></span></dt></dl></dd></dl></div><p>
+      The .NET Binding for the C++ Qpid Messaging Client is a library that gives
+      any .NET program access to Qpid C++ Messaging objects and methods.
+    </p><div class="section" title="5.1. .NET Binding for the C++ Messaging Client Component Architecture"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id413214"></a>5.1. .NET Binding for the C++ Messaging Client Component Architecture</h2></div></div></div><pre class="programlisting">
+                      +----------------------------+
+                      | Dotnet examples            |
+                      | Managed C#                 |
+                      +------+---------------+-----+
+                             |               |
+                             V               |
+        +---------------------------+        |
+        | .NET Managed Callback     |        |
+        | org.apache.qpid.messaging.|        |
+        | sessionreceiver.dll       |        |
+        +----------------------+----+        |
+                               |             |
+managed                        V             V
+(.NET)                 +--------------------------------+
+:::::::::::::::::::::::| .NET Binding Library           |::::::::::::
+unmanaged              | org.apache.qpid.messaging.dll  |
+(Native Win32/64)      +---------------+----------------+
+                                       |
+                                       |
+      +----------------+               |
+      | Native examples|               |
+      | Unmanaged C++  |               |
+      +--------+-------+               |
+               |                       |
+               V                       V
+          +----------------------------------+
+          | QPID Messaging C++ Libraries     |
+          | qpid*.dll qmf*.dll               |
+          +--------+--------------+----------+
+</pre><p>This diagram illustrates the code and library components of the binding
+and the hierarchical relationships between them.</p><div class="table"><a name="table-Dotnet-Binding-Component-Architecture"></a><p class="title"><b>Table 5.1. .NET Binding for the C++ Messaging Client Component Architecture</b></p><div class="table-contents"><table summary=".NET Binding for the C++ Messaging Client Component Architecture" border="1"><colgroup><col><col></colgroup><thead><tr><th>Component Name</th><th>Component Function</th></tr></thead><tbody><tr><td>QPID Messaging C++ Libraries</td><td>The QPID Messaging C++ core run time system</td></tr><tr><td>Unmanaged C++ Example Source Programs</td><td>Ordinary C++ programs that illustrate using qpid/cpp Messaging directly
+		in a native Windows environment.</td></tr><tr><td>.NET Messaging Binding Library</td><td>The .NET Messaging Binding library provides interoprability between
+		managed .NET programs and the unmanaged, native Qpid Messaging C++ core
+		run time system. .NET programs create a Reference to this library thereby
+		exposing all of the native C++ Messaging functionality to programs
+		written in any .NET language.</td></tr><tr><td>.NET Messaging Managed Callback Library</td><td>An extension of the .NET Messaging Binding Library that provides message
+		callbacks in a managed .NET environment.</td></tr><tr><td>Managed C# .NET Example Source Programs</td><td>Various C# example programs that illustrate using .NET Binding for C++ Messaging in the .NET environment.</td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s05.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch05s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.5. Transactions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 5.2. .NET Binding for the C++ Messaging Client Examples</td></tr></table></div></body></html>



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message