You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2012/08/12 21:19:53 UTC

svn commit: r1372183 [16/19] - in /qpid/site/docs/books/trunk_new: ./ AMQP-Messaging-Broker-CPP-Book/ AMQP-Messaging-Broker-CPP-Book/html/ AMQP-Messaging-Broker-CPP-Book/html/css/ AMQP-Messaging-Broker-CPP-Book/html/images/ AMQP-Messaging-Broker-CPP-Bo...

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s09.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s09.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s09.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s09.html Sun Aug 12 19:19:49 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" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.a
 pache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">
 Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><LI><A 
 href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="ch02.html">Using the Qpid Messaging API</a></span> &gt; <span class="breadcrumb-node">Transactions</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2509237"></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="id2509264" href="#ftn.id2509264" class="footnote">8</a>]</sup>
+
+      .</p><div class="example"><a name="id2509274"></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 name="ftn.id2509264" href="#id2509264" 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><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><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s12.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s12.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s12.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s12.html Sun Aug 12 19:19:49 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" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://q
 pid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.h
 tml">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><L
 I><A href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="ch02.html">Using the Qpid Messaging API</a></span> &gt; <span class="breadcrumb-node">The Request / Response Pattern</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2552359"></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="id2552382"></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><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><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s13.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s13.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s13.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s13.html Sun Aug 12 19:19:49 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" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/downloa
 d.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A>
 </LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.
 apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="ch02.html">Using the Qpid Messaging API</a></span> &gt; <span class="breadcrumb-node">Performance Tips</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2552469"></a>2.13. Performance Tips</h2></div></div></div><div class="itemizedlist"><ul><li><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><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><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><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><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><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><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><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s14.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s14.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s14.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s14.html Sun Aug 12 19:19:49 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" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></L
 I><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https
 ://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.apache.org/foundation/s
 ponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="ch02.html">Using the Qpid Messaging API</a></span> &gt; <span class="breadcrumb-node">Cluster Failover</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2552554"></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 conti
 nue their work. Each broker in the cluster also advertises the addresses of all known brokers
+
+      <sup>[<a name="id2552568" href="#ftn.id2552568" 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="id2552583"></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 name="ftn.id2552568" href="#id2552568" class="para">11</a>] </sup>This is done via the amq.failover exchange in AMQP 0-10</p></div></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><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s15.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s15.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s15.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch02s15.html Sun Aug 12 19:19:49 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" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download
 .html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A><
 /LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.a
 pache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="ch02.html">Using the Qpid Messaging API</a></span> &gt; <span class="breadcrumb-node">Logging</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2552640"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552651"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2552699"></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><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><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch03s03.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch03s03.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch03s03.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch03s03.html Sun Aug 12 19:19:49 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" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI
 ><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apac
 he.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apach
 e.org">Home</A></LI><LI><A href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="QpidJMS.html">Using the Qpid JMS client</a></span> &gt; <span class="breadcrumb-node">Java JMS Message Properties</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2554582"></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="id2554613"></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="id2554633" href="#ftn.id2554633" 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="id2554666" href="#ftn.id2554666" 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="id2554691" href="#ftn.id2554691" 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="id2554729" href="#ftn.id2554729" 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 name="ftn.id2554633" href="#id2554633" 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 name="ftn.id2554666" href="#id2554666" 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 name="ftn.id2554691" href="#id2554691" class="para">c</a>] </sup>The reply_to is conve
 rted from the protocol representation into an address.</p></div><div class="footnote"><p><sup>[<a name="ftn.id2554729" href="#id2554729" class="para">d</a>] </sup>JMSExpiration = dp.ttl + currentTime</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="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><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch03s06.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch03s06.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch03s06.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch03s06.html Sun Aug 12 19:19:49 2012
@@ -0,0 +1,40 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>3.6. Configuring the JMS Client</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http:
 //qpid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_list
 s.html">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI
 ><LI><A href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="QpidJMS.html">Using the Qpid JMS client</a></span> &gt; <span class="breadcrumb-node">Configuring the JMS Client</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2555014"></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><li><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><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><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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="client-jvm-properties"></a>3.6.1. Qpid JVM Arguments</h3></div></div></div><div class="table"><a name="id2555128"></a><p class="title"><b>Table 3.6. Config Options For Connection Behaviour</b></p><div class="table-contents"><table summary="Con
 fig 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 can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</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 use
 d 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="id2555236"></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 can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</p></td></tr><tr><td>qpid.jms.daemon.dispatcher</td><td>boolean</td><td>false</td><td><p>Controls whether the Session dispatcher thread is a daemon thread or not. If this system property is set to true then the Session dispatcher threads will be created as daemon threads. This setting is introduced in version 0.16.</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id2555352"></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>Descr
 iption</th></tr></thead><tbody><tr><td>max_prefetch</td><td>int</td><td>500</td><td>Maximum number of pre-fetched messages per consumer. <p>This can also be defaulted for consumers created on a particular connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options, 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 above 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><li><p>When the ack timer fires.</p></li><li><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 can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id2555492"></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 {persistent|all} is set then persistent messages or all messages will be sent synchronously.</p><p>This can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id2555554"></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="v
 arname">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 time threads created by the real time thread factory.</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id2555634"></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 interface <code class="varname">org.apache.qpid.transport.network.OutgoingNetworkTransport</code>.</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>qpid.tcp_nodelay</td><td>boolean</td><td>true</td><td>
+		  <p>Sets the TCP_NODELAY property of the underlying socket. The default was changed to true as of Qpid 0.14.</p>
+		  <p>This can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</p>
+		  <p>For compatibility with older clients, the synonym <code class="varname">amqj.tcp_nodelay</code> is supported.</p>
+		</td></tr><tr><td>qpid.send_buffer_size</td><td>integer</td><td>65535</td><td>
+		  <p>Sets the SO_SNDBUF property of the underlying socket. Added in Qpid 0.16.</p>
+		  <p>For compatibility with older clients, the synonym <code class="varname">amqj.sendBufferSize</code> is supported.</p>
+		</td></tr><tr><td>qpid.receive_buffer_size</td><td>integer</td><td>65535</td><td>
+		  <p>Sets the SO_RCVBUF property of the underlying socket. Added in Qpid 0.16.</p>
+		  <p>For compatibility with older clients, the synonym <code class="varname">amqj.receiveBufferSize</code> is supported.</p>
+		</td></tr><tr><td>qpid.failover_method_timeout</td><td>long</td><td>60000</td><td>
+              <p>During failover, this is the timeout for each attempt to try to re-establish the connection.
+                    If a reconnection attempt exceeds the timeout, the entire failover process is aborted.</p>
+              <p>It is only applicable for AMQP 0-8/0-9/0-9-1 clients.</p>
+            </td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id2555842"></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 can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</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_proto
 col</code> must be set to the principal for the qpidd broker, e.g. <code class="varname">qpidd</code>.</p><p>This can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</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 can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</p></td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id2555973"></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="id25559
 79" href="#ftn.id2555979" class="footnote">14</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></table></div></div><br class="table-break"><div class="table"><a name="id2556067"></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><tr><td>qpid.ssl.KeyManagerFactory.algorithm</td><td>string</td><td>-</td><td>
+		  <p>The key manager factory algorithm name. If not set, defaults to the value returned from the Java runtime call <code class="literal">KeyManagerFactory.getDefaultAlgorithm()</code></p>
+		  <p>For compatibility with older clients, the synonym <code class="varname">qpid.ssl.keyStoreCertType</code> is supported.</p>
+		</td></tr><tr><td>qpid.ssl.TrustManagerFactory.algorithm</td><td>string</td><td>-</td><td>
+		  <p>The trust manager factory algorithm name. If not set, defaults to the value returned from the Java runtime call <code class="literal">TrustManagerFactory.getDefaultAlgorithm()</code></p>
+		  <p>For compatibility with older clients, the synonym <code class="varname">qpid.ssl.trustStoreCertType</code> is supported.</p>
+		</td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="id2556190"></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="id2556197" href="#ftn.id2556197" class="footnote">15</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 required. 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 can also be set per 
 connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</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 can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</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 can also be set per connection using the <a class="link" href="QpidJNDI.html#section-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</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 can also be set per connection using the <a class="link" href="QpidJNDI.html#sectio
 n-jms-connection-url" title="3.2.2. Connection URLs">Connection URL</a> options.</p></td></tr></tbody></table></div></div><br class="table-break"></div></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"> Chapter 4. Using the Qpid WCF client</td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s02.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s02.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s02.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s02.html Sun Aug 12 19:19:49 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" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html"
 >Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><L
 I><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.apache.
 org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="QpidWCF.html">Using the Qpid WCF client</a></span> &gt; <span class="breadcrumb-node">Endpoints</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2556664"></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><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><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s03.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s03.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s03.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s03.html Sun Aug 12 19:19:49 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" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><A h
 ref="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwiki.a
 pache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.apache.org/foundation/sponsorship
 .html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="QpidWCF.html">Using the Qpid WCF client</a></span> &gt; <span class="breadcrumb-node">Message Headers</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2556706"></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><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><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s04.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s04.html?rev=1372183&view=auto
==============================================================================
--- qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s04.html (added)
+++ qpid/site/docs/books/trunk_new/Programming-In-Apache-Qpid-Book/html/ch04s04.html Sun Aug 12 19:19:49 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" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><
 A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwik
 i.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.apache.org/foundation/sponsors
 hip.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">Programming in Apache Qpid</a></span> &gt; <span class="breadcrumb-link"><a href="QpidWCF.html">Using the Qpid WCF client</a></span> &gt; <span class="breadcrumb-node">Security</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2556740"></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><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><div class="main_text_area_bottom"></div></div></div></body></html>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org