Modified: websites/production/camel/content/book-pattern-appendix.html
==============================================================================
--- websites/production/camel/content/book-pattern-appendix.html (original)
+++ websites/production/camel/content/book-pattern-appendix.html Thu Nov 29 
08:26:57 2018
@@ -95,16 +95,16 @@
 <p>There now follows a breakdown of the various <a shape="rect" 
class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/toc.html"; 
rel="nofollow">Enterprise Integration Patterns</a> that Camel supports</p>
 
 <h2 id="BookPatternAppendix-MessagingSystems">Messaging Systems</h2>
-<h3 id="BookPatternAppendix-MessageChannel">Message Channel</h3><p>Camel 
supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/MessageChannel.html"; 
rel="nofollow">Message Channel</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a>. The Message 
Channel is an internal implementation detail of the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html";>Endpoint</a>
 interface and all interactions with the Message Channel are via the Endpoint 
interfaces.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/MessageChannelSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/MessageChannelSolution.gif";></span></p><p><strong
 style="font-size: 16.0px;line-height: 1.5625;"><br clear="none
 "></strong></p><p><strong style="font-size: 16.0px;line-height: 
1.5625;">Example</strong></p><p>In JMS, Message Channels are represented by 
topics and queues such as the following</p><div class="code panel pdl 
conf-macro output-block" data-hasbody="true" data-macro-name="code" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 id="BookPatternAppendix-MessageChannel">Message 
Channel</h3><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/MessageChannel.html"; 
rel="nofollow">Message Channel</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a>. The Message 
Channel is an internal implementation detail of the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html";>Endpoint</a>
 interface and all interactions with the Message Channel are via the Endpoint 
interfaces.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/MessageChannelSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/MessageChannelSolution.gif";>
 </span></p><p><strong style="font-size: 16.0px;line-height: 1.5625;"><br 
clear="none"></strong></p><p><strong style="font-size: 16.0px;line-height: 
1.5625;">Example</strong></p><p>In JMS, Message Channels are represented by 
topics and queues such as the following</p><div class="code panel pdl 
conf-macro output-block" data-hasbody="true" data-macro-name="code" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: text; 
gutter: false; theme: Default" data-theme="Default">jms:queue:foo</pre>
 </div></div><p>&#160;</p><p>This message channel can be then used within the 
<a shape="rect" href="jms.html">JMS</a>&#160;component</p><p><strong 
style="line-height: 1.4285715;">Using the&#160;<a shape="rect" 
href="fluent-builders.html">Fluent Builders</a></strong></p><div class="code 
panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; 
gutter: false; theme: Default" data-theme="Default">to("jms:queue:foo")</pre>
 </div></div><p><strong><br clear="none"></strong></p><p><strong>Using 
the&#160;<a shape="rect" href="spring-xml-extensions.html">Spring XML 
Extensions</a></strong></p><div class="code panel pdl conf-macro output-block" 
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml; 
gutter: false; theme: Default" data-theme="Default">&lt;to 
uri="jms:queue:foo"/&gt;</pre>
-</div></div><p>&#160;</p><p>For more details see</p><ul><li><a shape="rect" 
href="message.html">Message</a></li><li><a shape="rect" 
href="message-endpoint.html">Message Endpoint</a></li></ul><p> </p><h4 
id="BookPatternAppendix-UsingThisPattern">Using This Pattern</h4>
+</div></div><p>&#160;</p><p>For more details see</p><ul><li><a shape="rect" 
href="message.html">Message</a></li><li><a shape="rect" 
href="message-endpoint.html">Message Endpoint</a></li></ul><p> </p><div 
class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h4 id="BookPatternAppendix-UsingThisPattern">Using 
This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p><p> 
</p>
-<h3 id="BookPatternAppendix-Message">Message</h3>
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div><p> </p></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 id="BookPatternAppendix-Message">Message</h3>
 
 <p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/Message.html"; 
rel="nofollow">Message</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using the <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Message.html";>Message</a>
 interface. </p>
 
@@ -151,10 +151,10 @@ from("direct:startInOut").inOut("bean:pr
 </pre>
 </div></div>
 
-<h4 id="BookPatternAppendix-UsingThisPattern.1">Using This Pattern</h4>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h4 id="BookPatternAppendix-UsingThisPattern.1">Using 
This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p>
-<h3 id="BookPatternAppendix-PipesandFilters">Pipes and Filters</h3><p>Camel 
supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/PipesAndFilters.html"; 
rel="nofollow">Pipes and Filters</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> in various 
ways.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/PipesAndFilters.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/PipesAndFilters.gif";></span></p><p>With
 Camel you can split your processing across multiple independent <a 
shape="rect" href="endpoint.html">Endpoint</a> instances which can then be 
chained together.</p><h4 id="BookPatternAppendix-UsingRoutingLogic">Using 
Routing Logic</h4><p>You can create pipelines of logic using multiple <a 
shape="rect" href="endpoint.html">Endpoint</a> or <a shape="rect" h
 ref="message-translator.html">Message Translator</a> instances as 
follows<plain-text-body>{snippet:id=example|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java}</plain-text-body>Though
 pipeline is the default mode of operation when you specify multiple outputs in 
Camel. The opposite to pipeline is multicast; which fires the same message into 
each of its outputs. (See the example below).</p><p>In Spring XML you can use 
the&#160;<strong><code>&lt;pipeline/&gt;</code></strong> element</p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;route&gt;
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 id="BookPatternAppendix-PipesandFilters">Pipes 
and Filters</h3><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/PipesAndFilters.html"; 
rel="nofollow">Pipes and Filters</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> in various 
ways.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/PipesAndFilters.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/PipesAndFilters.gif";></span></p><p>With
 Camel you can split your processing across multiple independent <a 
shape="rect" href="endpoint.html">Endpoint</a> instances which can then be 
chained together.</p><h4 id="BookPatternAppendix-UsingRoutingLogic">Using 
Routing Logic</h4><p>You can create pipelines of logic u
 sing multiple <a shape="rect" href="endpoint.html">Endpoint</a> or <a 
shape="rect" href="message-translator.html">Message Translator</a> instances as 
follows<plain-text-body>{snippet:id=example|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java}</plain-text-body>Though
 pipeline is the default mode of operation when you specify multiple outputs in 
Camel. The opposite to pipeline is multicast; which fires the same message into 
each of its outputs. (See the example below).</p><p>In Spring XML you can use 
the&#160;<strong><code>&lt;pipeline/&gt;</code></strong> element</p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;route&gt;
   &lt;from uri="activemq:SomeQueue"/&gt;
   &lt;pipeline&gt;
     &lt;bean ref="foo"/&gt;
@@ -182,8 +182,8 @@ from("direct:startInOut").inOut("bean:pr
     &lt;/pipeline&gt;
   &lt;/multicast&gt;
 &lt;/route&gt;
-</plain-text-body><p>In the above example we are routing from a single <a 
shape="rect" href="endpoint.html">Endpoint</a> to a list of different endpoints 
specified using <a shape="rect" href="uris.html">URIs</a>. If you find the 
above a bit confusing, try reading about the <a shape="rect" 
href="architecture.html">Architecture</a> or try the <a shape="rect" 
href="examples.html">Examples</a></p><p><parameter ac:name=""><a shape="rect" 
href="using-this-pattern.html">Using This Pattern</a></parameter></p>
-<h3 id="BookPatternAppendix-MessageRouter">Message Router</h3>
+</plain-text-body><p>In the above example we are routing from a single <a 
shape="rect" href="endpoint.html">Endpoint</a> to a list of different endpoints 
specified using <a shape="rect" href="uris.html">URIs</a>. If you find the 
above a bit confusing, try reading about the <a shape="rect" 
href="architecture.html">Architecture</a> or try the <a shape="rect" 
href="examples.html">Examples</a></p><p><parameter ac:name=""><a shape="rect" 
href="using-this-pattern.html">Using This Pattern</a></parameter></p></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 id="BookPatternAppendix-MessageRouter">Message 
Router</h3>
 
 <p>The <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/MessageRouter.html"; 
rel="nofollow">Message Router</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> allows you to 
consume from an input destination, evaluate some predicate then choose the 
right output destination.</p>
 
@@ -234,10 +234,10 @@ Error rendering macro 'code': Invalid va
 <h4 id="BookPatternAppendix-Choicewithoutotherwise">Choice without 
otherwise</h4>
 <p>If you use a <code>choice</code> without adding an <code>otherwise</code>, 
any unmatched exchanges will be dropped by default. </p>
 
-<h4 id="BookPatternAppendix-UsingThisPattern.2">Using This Pattern</h4>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h4 id="BookPatternAppendix-UsingThisPattern.2">Using 
This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p>
-<h3 id="BookPatternAppendix-MessageTranslator">Message Translator</h3>
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 
id="BookPatternAppendix-MessageTranslator">Message Translator</h3>
 
 <p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/MessageTranslator.html"; 
rel="nofollow">Message Translator</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> by using an 
arbitrary <a shape="rect" href="processor.html">Processor</a> in the routing 
logic, by using a <a shape="rect" href="bean-integration.html">bean</a> to 
perform the transformation, or by using transform() in the DSL. You can also 
use a <a shape="rect" href="data-format.html">Data Format</a> to marshal and 
unmarshal messages in different encodings.</p>
 
@@ -293,8 +293,8 @@ from("activemq:My.Queue").
 
 
 <parameter ac:name=""><a shape="rect" href="using-this-pattern.html">Using 
This Pattern</a></parameter>
-<ul class="alternate"><li><a shape="rect" href="content-enricher.html">Content 
Enricher</a></li><li><a shape="rect" 
href="using-getin-or-getout-methods-on-exchange.html">Using getIn or getOut 
methods on Exchange</a></li></ul>
-<h3 id="BookPatternAppendix-MessageEndpoint">Message Endpoint</h3><p>Camel 
supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/MessageEndpoint.html"; 
rel="nofollow">Message Endpoint</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using the <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html";>Endpoint</a>
 interface.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/MessageEndpointSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/MessageEndpointSolution.gif";></span></p><p>When
 using the <a shape="rect" href="dsl.html">DSL</a> to create <a shape="rect" 
href="routes.html">Routes</a> you typically refer to Message Endpoints by their 
<a shape="rect" href="uris.html">URI
 s</a> rather than directly using the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html";>Endpoint</a>
 interface. Its then a responsibility of the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html";>CamelContext</a>
 to create and activate the necessary Endpoint instances using the available <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Component.html";>Component</a>
 implementations.</p><h4 id="BookPatternAppendix-Example">Example</h4><p>The 
following example route demonstrates the use of a <a shape="rect" 
href="https://cwiki.apache.org/confluence/display/SM/File";>File</a> Consumer 
Endpoint and <a shape="rect" href="jms.html">JMS</a> Producer 
Endpoint</p><p><strong><br clear="none"></strong></p><p><strong>Using 
the&#160;<a shape="rect" href="fluent-bui
 lders.html">Fluent Builders</a></strong></p><div class="code panel pdl 
conf-macro output-block" data-hasbody="true" data-macro-name="code" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<ul class="alternate"><li><a shape="rect" href="content-enricher.html">Content 
Enricher</a></li><li><a shape="rect" 
href="using-getin-or-getout-methods-on-exchange.html">Using getIn or getOut 
methods on Exchange</a></li></ul></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 id="BookPatternAppendix-MessageEndpoint">Message 
Endpoint</h3><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/MessageEndpoint.html"; 
rel="nofollow">Message Endpoint</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using the <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html";>Endpoint</a>
 interface.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/MessageEndpointSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/MessageEndpointSolution.gif";></span></p><p>When
 using the <a shape="rect" href="dsl.html">DSL</a> to create <a shape="rect" 
href="routes.html">Routes</a> yo
 u typically refer to Message Endpoints by their <a shape="rect" 
href="uris.html">URIs</a> rather than directly using the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html";>Endpoint</a>
 interface. Its then a responsibility of the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html";>CamelContext</a>
 to create and activate the necessary Endpoint instances using the available <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Component.html";>Component</a>
 implementations.</p><h4 id="BookPatternAppendix-Example">Example</h4><p>The 
following example route demonstrates the use of a <a shape="rect" 
href="https://cwiki.apache.org/confluence/display/SM/File";>File</a> Consumer 
Endpoint and <a shape="rect" href="jms.html">JMS</a> Producer 
Endpoint</p><p><strong><br 
 clear="none"></strong></p><p><strong>Using the&#160;<a shape="rect" 
href="fluent-builders.html">Fluent Builders</a></strong></p><div class="code 
panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; 
gutter: false; theme: Default" 
data-theme="Default">from("file://local/router/messages/foo")
        .to("jms:queue:foo");</pre>
 </div></div><p>&#160;</p><p><strong><strong>Using the&#160;<a shape="rect" 
href="spring-xml-extensions.html">Spring XML 
Extensions</a></strong></strong></p><div class="code panel pdl conf-macro 
output-block" data-hasbody="true" data-macro-name="code" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
@@ -334,12 +334,12 @@ from("activemq:My.Queue").
 </div></div><p>In the example above the uri is a combination of&#160;<a 
shape="rect" href="simple.html">Simple</a>&#160;language and&#160;<a 
shape="rect" href="xpath.html">XPath</a>&#160;where the first part is simple 
(simple is default language). And then the plus sign separate to another 
language, where we specify the language name followed by a colon</p><div 
class="code panel pdl conf-macro output-block" data-hasbody="true" 
data-macro-name="code" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; 
gutter: false; theme: Default" data-theme="Default">from("direct:start")
   .toD("jms:${header.base}+language:xpath:/order/@id");</pre>
-</div></div><p>You can concat as many languages as you want, just separate 
them with the plus sign</p><p>The Dynamic To has a few options you can 
configure</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh">Name</th><th colspan="1" rowspan="1" 
class="confluenceTh">Default Value</th><th colspan="1" rowspan="1" 
class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd">uri</td><td colspan="1" rowspan="1" 
class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Mandatory:</strong> The uri to use. See 
above</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd">pattern</td><td colspan="1" rowspan="1" 
class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd">To set a specific <a shape="rect" 
href="exchange-pattern.html">Exchange Pattern</a> to use when sending to the 
endpoint. The original MEP is restored afterwards.</td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd">cacheSize</td><td 
 >colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">Allows to 
 >configure the cache size for the&#160;</span><code>ProducerCache</code><span 
 >style="color: rgb(0,0,0);">&#160;which caches producers for reuse. Will by 
 >default use the default cache size which is 1000. Setting the value to -1 
 >allows to turn off the cache all together.</span></td></tr><tr><td 
 >colspan="1" rowspan="1" class="confluenceTd">ignoreInvalidEndpoint</td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><span style="color: 
 >rgb(0,0,0);">Whether to ignore an endpoint URI that could not be resolved. If 
 >disabled, Camel will throw an exception identifying the invalid endpoint 
 >URI.</span></td></tr></tbody></table></div><p>&#160;</p><p>For more details 
 >see</p><ul><li><a shape="rect" href="recipien
 t-list.html">Recipient List</a></li><li><a shape="rect" 
href="message.html">Message</a></li><li><a shape="rect" 
href="wire-tap.html">Wire Tap</a><br clear="none"><br 
clear="none"></li></ul><p> </p><h4 
id="BookPatternAppendix-UsingThisPattern.3">Using This Pattern</h4>
+</div></div><p>You can concat as many languages as you want, just separate 
them with the plus sign</p><p>The Dynamic To has a few options you can 
configure</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh">Name</th><th colspan="1" rowspan="1" 
class="confluenceTh">Default Value</th><th colspan="1" rowspan="1" 
class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd">uri</td><td colspan="1" rowspan="1" 
class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Mandatory:</strong> The uri to use. See 
above</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd">pattern</td><td colspan="1" rowspan="1" 
class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd">To set a specific <a shape="rect" 
href="exchange-pattern.html">Exchange Pattern</a> to use when sending to the 
endpoint. The original MEP is restored afterwards.</td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd">cacheSize</td><td 
 >colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">Allows to 
 >configure the cache size for the&#160;</span><code>ProducerCache</code><span 
 >style="color: rgb(0,0,0);">&#160;which caches producers for reuse. Will by 
 >default use the default cache size which is 1000. Setting the value to -1 
 >allows to turn off the cache all together.</span></td></tr><tr><td 
 >colspan="1" rowspan="1" class="confluenceTd">ignoreInvalidEndpoint</td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><span style="color: 
 >rgb(0,0,0);">Whether to ignore an endpoint URI that could not be resolved. If 
 >disabled, Camel will throw an exception identifying the invalid endpoint 
 >URI.</span></td></tr></tbody></table></div><p>&#160;</p><p>For more details 
 >see</p><ul><li><a shape="rect" href="recipien
 t-list.html">Recipient List</a></li><li><a shape="rect" 
href="message.html">Message</a></li><li><a shape="rect" 
href="wire-tap.html">Wire Tap</a><br clear="none"><br 
clear="none"></li></ul><p> </p><div class="conf-macro output-block" 
data-hasbody="false" data-macro-name="include"><h4 
id="BookPatternAppendix-UsingThisPattern.3">Using This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p><p> 
</p>
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div><p> </p></div>
 
 <h2 id="BookPatternAppendix-MessagingChannels">Messaging Channels</h2>
-<h3 id="BookPatternAppendix-PointtoPointChannel">Point to Point 
Channel</h3><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/PointToPointChannel.html"; 
rel="nofollow">Point to Point Channel</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using the 
following components</p><ul><li><a shape="rect" href="seda.html">SEDA</a> for 
in-VM seda based messaging</li><li><a shape="rect" href="jms.html">JMS</a> for 
working with JMS Queues for high performance, clustering and load 
balancing</li><li><a shape="rect" href="jpa.html">JPA</a> for using a database 
as a simple message queue</li><li><a shape="rect" href="xmpp.html">XMPP</a> for 
point-to-point communication over XMPP (Jabber)</li><li>and 
others</li></ul><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/PointToPointSolu
 tion.gif" 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/PointToPointSolution.gif";></span></p><p>The
 following example demonstrates point to point messaging using the&#160;<a 
shape="rect" href="jms.html">JMS</a>&#160;component&#160;</p><p><strong>Using 
the&#160;<a shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><div class="code panel pdl conf-macro output-block" 
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 
id="BookPatternAppendix-PointtoPointChannel">Point to Point 
Channel</h3><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/PointToPointChannel.html"; 
rel="nofollow">Point to Point Channel</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using the 
following components</p><ul><li><a shape="rect" href="seda.html">SEDA</a> for 
in-VM seda based messaging</li><li><a shape="rect" href="jms.html">JMS</a> for 
working with JMS Queues for high performance, clustering and load 
balancing</li><li><a shape="rect" href="jpa.html">JPA</a> for using a database 
as a simple message queue</li><li><a shape="rect" href="xmpp.html">XMPP</a> for 
point-to-point communication over XMPP (Jabber)</li><li>and 
others</li></ul><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-exter
 nal-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/PointToPointSolution.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/PointToPointSolution.gif";></span></p><p>The
 following example demonstrates point to point messaging using the&#160;<a 
shape="rect" href="jms.html">JMS</a>&#160;component&#160;</p><p><strong>Using 
the&#160;<a shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><div class="code panel pdl conf-macro output-block" 
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; 
gutter: false; theme: Default" data-theme="Default">from("direct:start")
        .to("jms:queue:foo");</pre>
 </div></div><p>&#160;</p><p><strong><strong>Using the&#160;<a shape="rect" 
href="spring-xml-extensions.html">Spring XML 
Extensions</a></strong></strong></p><div class="code panel pdl conf-macro 
output-block" data-hasbody="true" data-macro-name="code" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
@@ -347,10 +347,10 @@ from("activemq:My.Queue").
        &lt;from uri="direct:start"/&gt;
        &lt;to uri="jms:queue:foo"/&gt;
 &lt;/route&gt;</pre>
-</div></div><p>&#160;</p><p>&#160;</p><p> </p><h4 
id="BookPatternAppendix-UsingThisPattern.4">Using This Pattern</h4>
+</div></div><p>&#160;</p><p>&#160;</p><p> </p><div class="conf-macro 
output-block" data-hasbody="false" data-macro-name="include"><h4 
id="BookPatternAppendix-UsingThisPattern.4">Using This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p><p> 
</p>
-<h3 id="BookPatternAppendix-PublishSubscribeChannel">Publish Subscribe 
Channel</h3>
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div><p> </p></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 
id="BookPatternAppendix-PublishSubscribeChannel">Publish Subscribe Channel</h3>
 
 <p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/PublishSubscribeChannel.html";
 rel="nofollow">Publish Subscribe Channel</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using for example 
the following components:</p>
 
@@ -389,10 +389,10 @@ Error rendering macro 'code': Invalid va
 &lt;/camelContext&gt;
 </pre>
 
-<h4 id="BookPatternAppendix-UsingThisPattern.5">Using This Pattern</h4>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h4 id="BookPatternAppendix-UsingThisPattern.5">Using 
This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p>
-<h2 id="BookPatternAppendix-DeadLetterChannel">Dead Letter 
Channel</h2><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/DeadLetterChannel.html"; 
rel="nofollow">Dead Letter Channel</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using the <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/DeadLetterChannel.html";>DeadLetterChannel</a>
 processor which is an <a shape="rect" href="error-handler.html">Error 
Handler</a>.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/DeadLetterChannelSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/DeadLetterChannelSolution.gif";></span></p><parameter
 ac:name="title">Differences Between The DeadLetterChannel And The DefaultEr
 
rorHandler</parameter><rich-text-body><p>The&#160;<strong><code>DefaultErrorHandler</code></strong>
 does very little: it ends the Exchange immediately and propagates the thrown 
Exception back to the 
caller.</p><p>The&#160;<strong><code>DeadLetterChannel</code></strong> lets you 
control behaviors including redelivery, whether to propagate the thrown 
Exception to the caller (the&#160;<strong><code>handled</code></strong> 
option), and where the (failed) Exchange should now be routed 
to.</p><p>The&#160;<strong><code>DeadLetterChannel</code></strong> is also by 
default configured to not be verbose in the logs, so when a message is handled 
and moved to the dead letter endpoint, then there is nothing logged. If you 
want some level of logging you can use the various options on the redelivery 
policy / dead letter channel to configure this. For example if you want the 
message history then 
set&#160;<strong><code>logExhaustedMessageHistory=true</code></strong> 
(and&#160;<strong><code>logHandled
 =true</code></strong> for <strong>Camel 2.15.x</strong> or older).</p><p>When 
the&#160;<strong><code>DeadLetterChannel</code></strong> moves a message to the 
dead letter endpoint, any new Exception thrown is by default handled by the 
dead letter channel as well. This ensures that 
the&#160;<strong><code>DeadLetterChannel</code></strong> will always succeed. 
From <strong>Camel 2.15</strong>: this behavior can be changed by setting the 
option <strong><code>deadLetterHandleNewException=false</code></strong>. Then 
if a new Exception is thrown, then the dead letter channel will fail and 
propagate back that new Exception (which is the behavior of the default error 
handler). When a new Exception occurs then the dead letter channel logs this 
at&#160;<strong><code>WARN</code></strong> level. This can be turned off by 
setting 
<strong><code>logNewException=false</code></strong>.</p></rich-text-body><h3 
id="BookPatternAppendix-Redelivery">Redelivery</h3><p>It is common for a 
temporary outage or 
 database deadlock to cause a message to fail to process; but the chances are 
if its tried a few more times with some time delay then it will complete fine. 
So we typically wish to use some kind of redelivery policy to decide how many 
times to try redeliver a message and how long to wait before redelivery 
attempts.</p><p>The <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/RedeliveryPolicy.html";>RedeliveryPolicy</a>
 defines how the message is to be redelivered. You can customize things 
like</p><ul><li>The number of times a message is attempted to be redelivered 
before it is considered a failure and sent to the dead letter 
channel.</li><li>The initial redelivery timeout.</li><li>Whether or not 
exponential backoff is used, i.e., the time between retries increases using a 
backoff multiplier.</li><li>Whether to use collision avoidance to add some 
randomness to the timings.</li><li>Delay pattern (see below for 
 details).</li><li><strong>Camel 2.11:</strong> Whether to allow redelivery 
during stopping/shutdown.</li></ul><p>Once all attempts at redelivering the 
message fails then the message is forwarded to the dead letter queue.</p><h3 
id="BookPatternAppendix-AboutMovingExchangetoDeadLetterQueueandUsinghandled()">About
 Moving Exchange to Dead Letter Queue and 
Using&#160;<strong><code>handled()</code></strong></h3><p><strong><code>handled()</code></strong>
 on <a shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p><p>When all attempts of redelivery have failed the <a 
shape="rect" href="exchange.html">Exchange</a> is moved to the dead letter 
queue (the dead letter endpoint). The exchange is then complete and from the 
client point of view it was processed. As such the <a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a> have handled the <a 
shape="rect" href="exchange.html">Exchange</a>.</p><p>For instance configuring 
the dead letter channel as:</p><p><stro
 ng>Using the <a shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><parameter 
ac:name="language">java</parameter><plain-text-body>errorHandler(deadLetterChannel("jms:queue:dead")
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h2 id="BookPatternAppendix-DeadLetterChannel">Dead 
Letter Channel</h2><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/DeadLetterChannel.html"; 
rel="nofollow">Dead Letter Channel</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using the <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/DeadLetterChannel.html";>DeadLetterChannel</a>
 processor which is an <a shape="rect" href="error-handler.html">Error 
Handler</a>.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/DeadLetterChannelSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/DeadLetterChannelSolution.gif";></span></p><p
 arameter ac:name="title">Differences Between The DeadLetterChannel And The 
DefaultErrorHandler</parameter><rich-text-body><p>The&#160;<strong><code>DefaultErrorHandler</code></strong>
 does very little: it ends the Exchange immediately and propagates the thrown 
Exception back to the 
caller.</p><p>The&#160;<strong><code>DeadLetterChannel</code></strong> lets you 
control behaviors including redelivery, whether to propagate the thrown 
Exception to the caller (the&#160;<strong><code>handled</code></strong> 
option), and where the (failed) Exchange should now be routed 
to.</p><p>The&#160;<strong><code>DeadLetterChannel</code></strong> is also by 
default configured to not be verbose in the logs, so when a message is handled 
and moved to the dead letter endpoint, then there is nothing logged. If you 
want some level of logging you can use the various options on the redelivery 
policy / dead letter channel to configure this. For example if you want the 
message history then set&#160;<strong><cod
 e>logExhaustedMessageHistory=true</code></strong> 
(and&#160;<strong><code>logHandled=true</code></strong> for <strong>Camel 
2.15.x</strong> or older).</p><p>When 
the&#160;<strong><code>DeadLetterChannel</code></strong> moves a message to the 
dead letter endpoint, any new Exception thrown is by default handled by the 
dead letter channel as well. This ensures that 
the&#160;<strong><code>DeadLetterChannel</code></strong> will always succeed. 
From <strong>Camel 2.15</strong>: this behavior can be changed by setting the 
option <strong><code>deadLetterHandleNewException=false</code></strong>. Then 
if a new Exception is thrown, then the dead letter channel will fail and 
propagate back that new Exception (which is the behavior of the default error 
handler). When a new Exception occurs then the dead letter channel logs this 
at&#160;<strong><code>WARN</code></strong> level. This can be turned off by 
setting 
<strong><code>logNewException=false</code></strong>.</p></rich-text-body><h3 
id="BookP
 atternAppendix-Redelivery">Redelivery</h3><p>It is common for a temporary 
outage or database deadlock to cause a message to fail to process; but the 
chances are if its tried a few more times with some time delay then it will 
complete fine. So we typically wish to use some kind of redelivery policy to 
decide how many times to try redeliver a message and how long to wait before 
redelivery attempts.</p><p>The <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/RedeliveryPolicy.html";>RedeliveryPolicy</a>
 defines how the message is to be redelivered. You can customize things 
like</p><ul><li>The number of times a message is attempted to be redelivered 
before it is considered a failure and sent to the dead letter 
channel.</li><li>The initial redelivery timeout.</li><li>Whether or not 
exponential backoff is used, i.e., the time between retries increases using a 
backoff multiplier.</li><li>Whether to use collision av
 oidance to add some randomness to the timings.</li><li>Delay pattern (see 
below for details).</li><li><strong>Camel 2.11:</strong> Whether to allow 
redelivery during stopping/shutdown.</li></ul><p>Once all attempts at 
redelivering the message fails then the message is forwarded to the dead letter 
queue.</p><h3 
id="BookPatternAppendix-AboutMovingExchangetoDeadLetterQueueandUsinghandled()">About
 Moving Exchange to Dead Letter Queue and 
Using&#160;<strong><code>handled()</code></strong></h3><p><strong><code>handled()</code></strong>
 on <a shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a></p><p>When all attempts of redelivery have failed the <a 
shape="rect" href="exchange.html">Exchange</a> is moved to the dead letter 
queue (the dead letter endpoint). The exchange is then complete and from the 
client point of view it was processed. As such the <a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a> have handled the <a 
shape="rect" href="exchange.html">
 Exchange</a>.</p><p>For instance configuring the dead letter channel 
as:</p><p><strong>Using the <a shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><parameter 
ac:name="language">java</parameter><plain-text-body>errorHandler(deadLetterChannel("jms:queue:dead")
     .maximumRedeliveries(3).redeliveryDelay(5000));
 </plain-text-body><p><strong>Using the <a shape="rect" 
href="spring-xml-extensions.html">Spring XML 
Extensions</a></strong></p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;route 
errorHandlerRef="myDeadLetterErrorHandler"&gt;
    &lt;!-- ... --&gt;
@@ -430,8 +430,8 @@ errorHandler(deadLetterChannel("jms:queu
     }</plain-text-body><p>Then configure the error handler to use the 
processor as follows:</p><parameter 
ac:name="language">java</parameter><plain-text-body>errorHandler(deadLetterChannel("jms:dead").onPrepareFailure(new
 MyPrepareProcessor()));</plain-text-body><p>&#160;</p><p>Configuring this from 
XML DSL is as follows:</p><parameter 
ac:name="language">xml</parameter><plain-text-body>&lt;bean id="myPrepare" 
class="org.apache.camel.processor.DeadLetterChannelOnPrepareTest.MyPrepareProcessor"/&gt;
 
 &lt;errorHandler id="dlc" type="DeadLetterChannel" deadLetterUri="jms:dead" 
onPrepareFailureRef="myPrepare"/&gt;</plain-text-body><p>&#160;</p><p>The&#160;<strong><code>onPrepare</code></strong>
 is also available using the default error handler.</p><h3 
id="BookPatternAppendix-WhichRouteFailed">Which Route 
Failed</h3><p><strong>Available as of Camel 2.10.4/2.11</strong></p><p>When 
Camel error handler handles an error such as <a shape="rect" 
href="dead-letter-channel.html">Dead Letter Channel</a> or using <a 
shape="rect" href="exception-clause.html">Exception Clause</a> with 
<strong><code>handled=true</code></strong>, then Camel will decorate the <a 
shape="rect" href="exchange.html">Exchange</a> with the route id where the 
error occurred.</p><p>Example:</p><parameter 
ac:name="language">java</parameter><plain-text-body>String failedRouteId = 
exchange.getProperty(Exchange.FAILURE_ROUTE_ID, String.class);
-</plain-text-body><p>The 
<strong><code>Exchange.FAILURE_ROUTE_ID</code></strong> have the constant value 
<strong><code>CamelFailureRouteId</code></strong>. This allows for example you 
to fetch this information in your dead letter queue and use that for error 
reporting.</p><h3 
id="BookPatternAppendix-ControlifRedeliveryisAllowedDuringStopping/Shutdown">Control
 if Redelivery is Allowed During Stopping/Shutdown</h3><p><strong>Available as 
of Camel 2.11</strong></p><p>Before <strong>Camel 2.10</strong>, Camel would 
perform redelivery while stopping a route, or shutting down Camel. This has 
improved a bit in <strong>Camel 2.10</strong>: Camel will no longer perform 
redelivery attempts when shutting down aggressively, e.g., during <a 
shape="rect" href="graceful-shutdown.html">Graceful Shutdown</a> and timeout 
hit.</p><p>From <strong>Camel 2.11</strong>: there is a new option 
<strong><code>allowRedeliveryWhileStopping</code></strong> which you can use to 
control if redelivery is allowed or
  not; notice that any in progress redelivery will still be executed. This 
option can only disallow any redelivery to be executed 
<em><strong>after</strong></em> the stopping of a route/shutdown of Camel has 
been triggered. If a redelivery is disallowed then a 
<strong><code>RejectedExcutionException</code></strong> is set on the <a 
shape="rect" href="exchange.html">Exchange</a> and the processing of the <a 
shape="rect" href="exchange.html">Exchange</a> stops. This means any consumer 
will see the <a shape="rect" href="exchange.html">Exchange</a> as failed due 
the <strong><code>RejectedExcutionException</code></strong>. The default value 
is <strong><code>true</code></strong> for backward compatibility.</p><p>For 
example, the following snippet shows how to do this with Java DSL and XML 
DSL:<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNoRedeliveryOnShutdownTest.java}</plain-text-body>And
 the sample sam
 ple with XML 
DSL<plain-text-body>{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringRedeliveryErrorHandlerNoRedeliveryOnShutdownTest.xml}</plain-text-body></p><h3
 id="BookPatternAppendix-Samples">Samples</h3><p>The following example shows 
how to configure the Dead Letter Channel configuration using the <a 
shape="rect" 
href="dsl.html">DSL</a><plain-text-body>{snippet:id=e3|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java}</plain-text-body>You
 can also configure the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/RedeliveryPolicy.html";>RedeliveryPolicy</a>
 as this example 
shows<plain-text-body>{snippet:id=e4|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java}</plain-text-body></p><h3
 id="BookPatternAppendix-HowCanIModifytheExchangeBeforeRede
 livery?">How Can I Modify the Exchange Before Redelivery?</h3><p>We support 
directly in <a shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a> to set a <a shape="rect" href="processor.html">Processor</a> that 
is executed <strong>before</strong> each redelivery attempt. When <a 
shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a> is doing 
redeliver its possible to configure a <a shape="rect" 
href="processor.html">Processor</a> that is executed just 
<strong>before</strong> every redelivery attempt. This can be used for the 
situations where you need to alter the message before its redelivered. Here we 
configure the <a shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a> to use our processor 
<strong><code>MyRedeliveryProcessor</code></strong> to be executed before each 
redelivery.<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelOnRedeliveryTest.java}</plain-text
 -body>And this is the processor 
<strong><code>MyRedeliveryProcessor</code></strong> where we alter the 
message.<plain-text-body>{snippet:id=e2|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelOnRedeliveryTest.java}</plain-text-body></p><h3
 
id="BookPatternAppendix-HowCanILogWhatCausedtheDeadLetterChanneltobeInvoked?">How
 Can I Log What Caused the Dead Letter Channel to be Invoked?</h3><p>You often 
need to know what went wrong that caused the Dead Letter Channel to be used and 
it does not offer logging for this purpose. So the Dead Letter Channel's 
endpoint can be set to a endpoint of our own (such 
as&#160;<strong><code>direct:deadLetterChannel</code></strong>). We write a 
route to accept this Exchange and log the Exception, then forward on to where 
we want the failed Exchange moved to (which might be a DLQ queue for instance). 
See also&#160;<a shape="rect" class="external-link" 
href="http://stackoverflow.com/questions/13711462/logging-cam
 el-exceptions-and-sending-to-the-dead-letter-channel" 
rel="nofollow">http://stackoverflow.com/questions/13711462/logging-camel-exceptions-and-sending-to-the-dead-letter-channel</a></p><p><parameter
 ac:name=""><a shape="rect" href="using-this-pattern.html">Using This 
Pattern</a></parameter></p><ul class="alternate"><li><a shape="rect" 
href="error-handler.html">Error Handler</a></li><li><a shape="rect" 
href="exception-clause.html">Exception Clause</a></li></ul>
-<h3 id="BookPatternAppendix-GuaranteedDelivery">Guaranteed 
Delivery</h3><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/GuaranteedMessaging.html"; 
rel="nofollow">Guaranteed Delivery</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using among others 
the following components:</p><ul><li><a shape="rect" href="file2.html">File</a> 
for using file systems as a persistent store of messages</li><li><a 
shape="rect" href="jms.html">JMS</a> when using persistent delivery (the 
default) for working with JMS Queues and Topics for high performance, 
clustering and load balancing</li><li><a shape="rect" href="jpa.html">JPA</a> 
for using a database as a persistence layer, or use any of the many other 
database component such as <a shape="rect" href="sql.html">SQL</a>, <a 
shape="rect" href="jdbc.html">JDBC</a>, <a shape="rect" 
href="ibatis.html">iBATIS</a>/<a shape="rect" href="mybatis.html">MyBatis<
 /a>, <a shape="rect" href="hibernate.html">Hibernate</a></li><li><a 
shape="rect" href="hawtdb.html">HawtDB</a> for a lightweight key-value 
persistent store</li></ul><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image 
confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/GuaranteedMessagingSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/GuaranteedMessagingSolution.gif";></span></p><h4
 id="BookPatternAppendix-Example.1">Example</h4><p>The following example 
demonstrates illustrates the use of&#160;<a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/GuaranteedMessaging.html"; 
rel="nofollow">Guaranteed Delivery</a>&#160;within the&#160;<a shape="rect" 
href="jms.html">JMS</a>&#160;component. By default, a message is not considered 
successfully delivered until the recipient has persisted the message locally 
guaranteeing its receipt in the event the destination
  becomes unavailable.</p><p><strong>Using the&#160;<a shape="rect" 
href="fluent-builders.html">Fluent Builders</a></strong></p><div class="code 
panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</plain-text-body><p>The 
<strong><code>Exchange.FAILURE_ROUTE_ID</code></strong> have the constant value 
<strong><code>CamelFailureRouteId</code></strong>. This allows for example you 
to fetch this information in your dead letter queue and use that for error 
reporting.</p><h3 
id="BookPatternAppendix-ControlifRedeliveryisAllowedDuringStopping/Shutdown">Control
 if Redelivery is Allowed During Stopping/Shutdown</h3><p><strong>Available as 
of Camel 2.11</strong></p><p>Before <strong>Camel 2.10</strong>, Camel would 
perform redelivery while stopping a route, or shutting down Camel. This has 
improved a bit in <strong>Camel 2.10</strong>: Camel will no longer perform 
redelivery attempts when shutting down aggressively, e.g., during <a 
shape="rect" href="graceful-shutdown.html">Graceful Shutdown</a> and timeout 
hit.</p><p>From <strong>Camel 2.11</strong>: there is a new option 
<strong><code>allowRedeliveryWhileStopping</code></strong> which you can use to 
control if redelivery is allowed or
  not; notice that any in progress redelivery will still be executed. This 
option can only disallow any redelivery to be executed 
<em><strong>after</strong></em> the stopping of a route/shutdown of Camel has 
been triggered. If a redelivery is disallowed then a 
<strong><code>RejectedExcutionException</code></strong> is set on the <a 
shape="rect" href="exchange.html">Exchange</a> and the processing of the <a 
shape="rect" href="exchange.html">Exchange</a> stops. This means any consumer 
will see the <a shape="rect" href="exchange.html">Exchange</a> as failed due 
the <strong><code>RejectedExcutionException</code></strong>. The default value 
is <strong><code>true</code></strong> for backward compatibility.</p><p>For 
example, the following snippet shows how to do this with Java DSL and XML 
DSL:<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RedeliveryErrorHandlerNoRedeliveryOnShutdownTest.java}</plain-text-body>And
 the sample sam
 ple with XML 
DSL<plain-text-body>{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringRedeliveryErrorHandlerNoRedeliveryOnShutdownTest.xml}</plain-text-body></p><h3
 id="BookPatternAppendix-Samples">Samples</h3><p>The following example shows 
how to configure the Dead Letter Channel configuration using the <a 
shape="rect" 
href="dsl.html">DSL</a><plain-text-body>{snippet:id=e3|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java}</plain-text-body>You
 can also configure the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/RedeliveryPolicy.html";>RedeliveryPolicy</a>
 as this example 
shows<plain-text-body>{snippet:id=e4|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java}</plain-text-body></p><h3
 id="BookPatternAppendix-HowCanIModifytheExchangeBeforeRede
 livery?">How Can I Modify the Exchange Before Redelivery?</h3><p>We support 
directly in <a shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a> to set a <a shape="rect" href="processor.html">Processor</a> that 
is executed <strong>before</strong> each redelivery attempt. When <a 
shape="rect" href="dead-letter-channel.html">Dead Letter Channel</a> is doing 
redeliver its possible to configure a <a shape="rect" 
href="processor.html">Processor</a> that is executed just 
<strong>before</strong> every redelivery attempt. This can be used for the 
situations where you need to alter the message before its redelivered. Here we 
configure the <a shape="rect" href="dead-letter-channel.html">Dead Letter 
Channel</a> to use our processor 
<strong><code>MyRedeliveryProcessor</code></strong> to be executed before each 
redelivery.<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelOnRedeliveryTest.java}</plain-text
 -body>And this is the processor 
<strong><code>MyRedeliveryProcessor</code></strong> where we alter the 
message.<plain-text-body>{snippet:id=e2|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelOnRedeliveryTest.java}</plain-text-body></p><h3
 
id="BookPatternAppendix-HowCanILogWhatCausedtheDeadLetterChanneltobeInvoked?">How
 Can I Log What Caused the Dead Letter Channel to be Invoked?</h3><p>You often 
need to know what went wrong that caused the Dead Letter Channel to be used and 
it does not offer logging for this purpose. So the Dead Letter Channel's 
endpoint can be set to a endpoint of our own (such 
as&#160;<strong><code>direct:deadLetterChannel</code></strong>). We write a 
route to accept this Exchange and log the Exception, then forward on to where 
we want the failed Exchange moved to (which might be a DLQ queue for instance). 
See also&#160;<a shape="rect" class="external-link" 
href="http://stackoverflow.com/questions/13711462/logging-cam
 el-exceptions-and-sending-to-the-dead-letter-channel" 
rel="nofollow">http://stackoverflow.com/questions/13711462/logging-camel-exceptions-and-sending-to-the-dead-letter-channel</a></p><p><parameter
 ac:name=""><a shape="rect" href="using-this-pattern.html">Using This 
Pattern</a></parameter></p><ul class="alternate"><li><a shape="rect" 
href="error-handler.html">Error Handler</a></li><li><a shape="rect" 
href="exception-clause.html">Exception Clause</a></li></ul></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 
id="BookPatternAppendix-GuaranteedDelivery">Guaranteed Delivery</h3><p>Camel 
supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/GuaranteedMessaging.html"; 
rel="nofollow">Guaranteed Delivery</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> using among others 
the following components:</p><ul><li><a shape="rect" href="file2.html">File</a> 
for using file systems as a persistent store of messages</li><li><a 
shape="rect" href="jms.html">JMS</a> when using persistent delivery (the 
default) for working with JMS Queues and Topics for high performance, 
clustering and load balancing</li><li><a shape="rect" href="jpa.html">JPA</a> 
for using a database as a persistence layer, or use any of the many other 
database component such as <a shape="rect" href="sql.html">SQL</a>, <a 
shape="rect" href="jdbc.html">JDBC</a>, <a sha
 pe="rect" href="ibatis.html">iBATIS</a>/<a shape="rect" 
href="mybatis.html">MyBatis</a>, <a shape="rect" 
href="hibernate.html">Hibernate</a></li><li><a shape="rect" 
href="hawtdb.html">HawtDB</a> for a lightweight key-value persistent 
store</li></ul><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/GuaranteedMessagingSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/GuaranteedMessagingSolution.gif";></span></p><h4
 id="BookPatternAppendix-Example.1">Example</h4><p>The following example 
demonstrates illustrates the use of&#160;<a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/GuaranteedMessaging.html"; 
rel="nofollow">Guaranteed Delivery</a>&#160;within the&#160;<a shape="rect" 
href="jms.html">JMS</a>&#160;component. By default, a message is not considered 
successfully delivered until the recipient has
  persisted the message locally guaranteeing its receipt in the event the 
destination becomes unavailable.</p><p><strong>Using the&#160;<a shape="rect" 
href="fluent-builders.html">Fluent Builders</a></strong></p><div class="code 
panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; 
gutter: false; theme: Default" data-theme="Default">from("direct:start")
        .to("jms:queue:foo");</pre>
 </div></div><p>&#160;</p><p><strong><strong>Using the&#160;<a shape="rect" 
href="spring-xml-extensions.html">Spring XML 
Extensions</a></strong></strong></p><div class="code panel pdl conf-macro 
output-block" data-hasbody="true" data-macro-name="code" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
@@ -439,10 +439,10 @@ errorHandler(deadLetterChannel("jms:queu
        &lt;from uri="direct:start"/&gt;
        &lt;to uri="jms:queue:foo"/&gt;
 &lt;/route&gt;</pre>
-</div></div><p> </p><h4 id="BookPatternAppendix-UsingThisPattern.6">Using This 
Pattern</h4>
+</div></div><p> </p><div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h4 id="BookPatternAppendix-UsingThisPattern.6">Using 
This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p><p> 
</p>
-<h3 id="BookPatternAppendix-MessageBus">Message Bus</h3><p>Camel supports the 
<a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/PointToPointChannel.html"; 
rel="nofollow">Message Bus</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a>. You could view 
Camel as a Message Bus itself as it allows producers and consumers to be 
decoupled.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/MessageBusSolution.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/MessageBusSolution.gif";></span></p><p>Folks
 often assume that a Message Bus is a JMS though so you may wish to refer to 
the <a shape="rect" href="jms.html">JMS</a> component for traditional MOM 
support.<br clear="none"> Also worthy of note is the <a shape="rect" 
href="xmpp.html">XMPP</a> component for supporting messaging
  over XMPP (Jabber)</p><p>Of course there are also ESB products such as <a 
shape="rect" class="external-link" 
href="http://servicemix.apache.org/home.html";>Apache ServiceMix</a> which serve 
as full fledged message busses.<br clear="none"> You can interact with <a 
shape="rect" class="external-link" 
href="http://servicemix.apache.org/home.html";>Apache ServiceMix</a> from Camel 
in many ways, but in particular you can use the <a shape="rect" 
href="nmr.html">NMR</a> or <a shape="rect" href="jbi.html">JBI</a> component to 
access the ServiceMix message bus directly.</p><p>&#160;</p><h4 
id="BookPatternAppendix-Example.2">Example</h4><p>The following demonstrates 
how the Camel message bus can be used to communicate with consumers and 
producers</p><p><strong><br clear="none"></strong></p><p><strong>Using 
the&#160;<a shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><div class="code panel pdl conf-macro output-block" 
data-hasbody="true" data-macro-name="code" style="bord
 er-width: 1px;"><div class="codeContent panelContent pdl">
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div><p> </p></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 id="BookPatternAppendix-MessageBus">Message 
Bus</h3><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/PointToPointChannel.html"; 
rel="nofollow">Message Bus</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a>. You could view 
Camel as a Message Bus itself as it allows producers and consumers to be 
decoupled.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/MessageBusSolution.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/MessageBusSolution.gif";></span></p><p>Folks
 often assume that a Message Bus is a JMS though so you may wish to refer to 
the <a shape="rect" href="jms.html">JMS</a> component for traditional MOM 
support.<br clear="none"> Also worthy of note
  is the <a shape="rect" href="xmpp.html">XMPP</a> component for supporting 
messaging over XMPP (Jabber)</p><p>Of course there are also ESB products such 
as <a shape="rect" class="external-link" 
href="http://servicemix.apache.org/home.html";>Apache ServiceMix</a> which serve 
as full fledged message busses.<br clear="none"> You can interact with <a 
shape="rect" class="external-link" 
href="http://servicemix.apache.org/home.html";>Apache ServiceMix</a> from Camel 
in many ways, but in particular you can use the <a shape="rect" 
href="nmr.html">NMR</a> or <a shape="rect" href="jbi.html">JBI</a> component to 
access the ServiceMix message bus directly.</p><p>&#160;</p><h4 
id="BookPatternAppendix-Example.2">Example</h4><p>The following demonstrates 
how the Camel message bus can be used to communicate with consumers and 
producers</p><p><strong><br clear="none"></strong></p><p><strong>Using 
the&#160;<a shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><div class="code panel
  pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; 
gutter: false; theme: Default" data-theme="Default">from("direct:start")
        .pollEnrich("file:inbox?fileName=data.txt")
        .to("jms:queue:foo");</pre>
@@ -452,12 +452,12 @@ errorHandler(deadLetterChannel("jms:queu
        &lt;pollEnrich uri="file:inbox?fileName=data.txt"/&gt;
        &lt;to uri="jms:queue:foo"/&gt;
 &lt;/route&gt;</pre>
-</div></div><p> </p><h4 id="BookPatternAppendix-UsingThisPattern.7">Using This 
Pattern</h4>
+</div></div><p> </p><div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h4 id="BookPatternAppendix-UsingThisPattern.7">Using 
This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p><p> 
</p>
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div><p> </p></div>
 
 <h3 id="BookPatternAppendix-MessageConstruction">Message Construction</h3>
-<h2 id="BookPatternAppendix-EventMessage">Event Message</h2><p>Camel supports 
the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/EventMessage.html"; 
rel="nofollow">Event Message</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> by supporting the 
<a shape="rect" href="exchange-pattern.html">Exchange Pattern</a> on a <a 
shape="rect" href="message.html">Message</a> which can be set to 
<strong>InOnly</strong> to indicate a oneway event message. Camel <a 
shape="rect" href="components.html">Components</a> then implement this pattern 
using the underlying transport or protocols.</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image 
confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/EventMessageSolution.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/EventMessageSolution.gif";></span></p><p>The
 default behaviour of many <a
  shape="rect" href="components.html">Components</a> is InOnly such as for <a 
shape="rect" href="jms.html">JMS</a>, <a shape="rect" 
href="file2.html">File</a> or <a shape="rect" href="seda.html">SEDA</a></p><div 
class="confluence-information-macro confluence-information-macro-tip conf-macro 
output-block" data-hasbody="true" data-macro-name="tip"><p 
class="title">Related</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"> </span><div 
class="confluence-information-macro-body"><p>See the related <a shape="rect" 
href="request-reply.html">Request Reply</a> message.</p></div></div><h3 
id="BookPatternAppendix-ExplicitlyspecifyingInOnly">Explicitly specifying 
InOnly</h3><p>If you are using a component which defaults to InOut you can 
override the <a shape="rect" href="exchange-pattern.html">Exchange Pattern</a> 
for an endpoint using the pattern property.</p><div class="code panel pdl 
conf-macro output-block" data-hasbody="true" data-macro-name="cod
 e" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h2 id="BookPatternAppendix-EventMessage">Event 
Message</h2><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/EventMessage.html"; 
rel="nofollow">Event Message</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> by supporting the 
<a shape="rect" href="exchange-pattern.html">Exchange Pattern</a> on a <a 
shape="rect" href="message.html">Message</a> which can be set to 
<strong>InOnly</strong> to indicate a oneway event message. Camel <a 
shape="rect" href="components.html">Components</a> then implement this pattern 
using the underlying transport or protocols.</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image 
confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/EventMessageSolution.gif"; 
data-image-src="http://www.enterpriseintegrationpatte
 rns.com/img/EventMessageSolution.gif"></span></p><p>The default behaviour of 
many <a shape="rect" href="components.html">Components</a> is InOnly such as 
for <a shape="rect" href="jms.html">JMS</a>, <a shape="rect" 
href="file2.html">File</a> or <a shape="rect" href="seda.html">SEDA</a></p><div 
class="confluence-information-macro confluence-information-macro-tip conf-macro 
output-block" data-hasbody="true" data-macro-name="tip"><p 
class="title">Related</p><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"> </span><div 
class="confluence-information-macro-body"><p>See the related <a shape="rect" 
href="request-reply.html">Request Reply</a> message.</p></div></div><h3 
id="BookPatternAppendix-ExplicitlyspecifyingInOnly">Explicitly specifying 
InOnly</h3><p>If you are using a component which defaults to InOut you can 
override the <a shape="rect" href="exchange-pattern.html">Exchange Pattern</a> 
for an endpoint using the pattern property.</p><div cla
 ss="code panel pdl conf-macro output-block" data-hasbody="true" 
data-macro-name="code" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; 
gutter: false; theme: Default" 
data-theme="Default">foo:bar?exchangePattern=InOnly
 </pre>
 </div></div><p>From 2.0 onwards on Camel you can specify the <a shape="rect" 
href="exchange-pattern.html">Exchange Pattern</a> using the 
DSL.</p><p><strong>Using the <a shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><div class="code panel pdl conf-macro output-block" 
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
@@ -481,10 +481,10 @@ errorHandler(deadLetterChannel("jms:queu
     &lt;inOnly uri="mq:anotherQueue"/&gt;
 &lt;/route&gt;
 </pre>
-</div></div><p> </p><h4 id="BookPatternAppendix-UsingThisPattern.8">Using This 
Pattern</h4>
+</div></div><p> </p><div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h4 id="BookPatternAppendix-UsingThisPattern.8">Using 
This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p><p> 
</p>
-<h2 id="BookPatternAppendix-RequestReply">Request Reply</h2>
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div><p> </p></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h2 id="BookPatternAppendix-RequestReply">Request 
Reply</h2>
 
 <p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/RequestReply.html"; 
rel="nofollow">Request Reply</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> by supporting the 
<a shape="rect" href="exchange-pattern.html">Exchange Pattern</a> on a <a 
shape="rect" href="message.html">Message</a> which can be set to 
<strong>InOut</strong> to indicate a request/reply. Camel <a shape="rect" 
href="components.html">Components</a> then implement this pattern using the 
underlying transport or protocols.</p>
 
@@ -586,10 +586,10 @@ Error rendering macro 'code': Invalid va
  &lt;/camelContext&gt;
 </pre>
 
-<h4 id="BookPatternAppendix-UsingThisPattern.9">Using This Pattern</h4>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h4 id="BookPatternAppendix-UsingThisPattern.9">Using 
This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p>
-<h3 id="BookPatternAppendix-CorrelationIdentifier">Correlation 
Identifier</h3><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/CorrelationIdentifier.html"; 
rel="nofollow">Correlation Identifier</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> by getting or 
setting a header on a <a shape="rect" 
href="message.html">Message</a>.</p><p>When working with the <a shape="rect" 
href="activemq.html">ActiveMQ</a> or <a shape="rect" href="jms.html">JMS</a> 
components the correlation identifier header is called 
<strong>JMSCorrelationID</strong>. You can add your own correlation identifier 
to any message exchange to help correlate messages together to a single 
conversation (or business process).</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image 
confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/CorrelationIdentifierSolution
 .gif" 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/CorrelationIdentifierSolution.gif";></span></p><p>The
 use of a Correlation Identifier is key to working with the <a shape="rect" 
href="bam.html">Camel Business Activity Monitoring Framework</a> and can also 
be highly useful when testing with simulation or canned data such as with the 
<a shape="rect" href="mock.html">Mock testing framework</a></p><p>Some <a 
shape="rect" href="eip.html">EIP</a> patterns will spin off a sub message, and 
in those cases, Camel will add a correlation id on the <a shape="rect" 
href="exchange.html">Exchange</a> as a property with they key 
<code>Exchange.CORRELATION_ID</code>, which links back to the source <a 
shape="rect" href="exchange.html">Exchange</a>. For example the <a shape="rect" 
href="splitter.html">Splitter</a>, <a shape="rect" 
href="multicast.html">Multicast</a>, <a shape="rect" 
href="recipient-list.html">Recipient List</a>, and <a shape="rect" 
href="wire-tap.html">Wire Tap</a>
  EIP does this.</p><p>The following example demonstrates using the Camel 
JMSMessageID as the Correlation Identifier within a request/reply pattern in 
the&#160;<a shape="rect" 
href="jms.html">JMS</a>&#160;component</p><p><strong>Using the&#160;<a 
shape="rect" href="fluent-builders.html">Fluent Builders</a></strong></p><div 
class="code panel pdl conf-macro output-block" data-hasbody="true" 
data-macro-name="code" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 
id="BookPatternAppendix-CorrelationIdentifier">Correlation 
Identifier</h3><p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/CorrelationIdentifier.html"; 
rel="nofollow">Correlation Identifier</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> by getting or 
setting a header on a <a shape="rect" 
href="message.html">Message</a>.</p><p>When working with the <a shape="rect" 
href="activemq.html">ActiveMQ</a> or <a shape="rect" href="jms.html">JMS</a> 
components the correlation identifier header is called 
<strong>JMSCorrelationID</strong>. You can add your own correlation identifier 
to any message exchange to help correlate messages together to a single 
conversation (or business process).</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image 
confluence-external-resource"
  
src="http://www.enterpriseintegrationpatterns.com/img/CorrelationIdentifierSolution.gif";
 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/CorrelationIdentifierSolution.gif";></span></p><p>The
 use of a Correlation Identifier is key to working with the <a shape="rect" 
href="bam.html">Camel Business Activity Monitoring Framework</a> and can also 
be highly useful when testing with simulation or canned data such as with the 
<a shape="rect" href="mock.html">Mock testing framework</a></p><p>Some <a 
shape="rect" href="eip.html">EIP</a> patterns will spin off a sub message, and 
in those cases, Camel will add a correlation id on the <a shape="rect" 
href="exchange.html">Exchange</a> as a property with they key 
<code>Exchange.CORRELATION_ID</code>, which links back to the source <a 
shape="rect" href="exchange.html">Exchange</a>. For example the <a shape="rect" 
href="splitter.html">Splitter</a>, <a shape="rect" 
href="multicast.html">Multicast</a>, <a shape="rect" href="recipient-
 list.html">Recipient List</a>, and <a shape="rect" href="wire-tap.html">Wire 
Tap</a> EIP does this.</p><p>The following example demonstrates using the Camel 
JMSMessageID as the Correlation Identifier within a request/reply pattern in 
the&#160;<a shape="rect" 
href="jms.html">JMS</a>&#160;component</p><p><strong>Using the&#160;<a 
shape="rect" href="fluent-builders.html">Fluent Builders</a></strong></p><div 
class="code panel pdl conf-macro output-block" data-hasbody="true" 
data-macro-name="code" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; 
gutter: false; theme: Default" data-theme="Default">from("direct:start")
        
.to(ExchangePattern.InOut,"jms:queue:foo?useMessageIDAsCorrelationID=true")
        .to("mock:result");</pre>
@@ -599,8 +599,8 @@ Error rendering macro 'code': Invalid va
        &lt;to uri="jms:queue:foo?useMessageIDAsCorrelationID=true" 
pattern="InOut"/&gt;
        &lt;to uri="mock:result"/&gt;
 &lt;/route&gt;</pre>
-</div></div><h4 id="BookPatternAppendix-SeeAlso">See Also</h4><ul><li><a 
shape="rect" href="bam.html">BAM</a></li></ul>
-<h2 id="BookPatternAppendix-ReturnAddress">Return Address</h2>
+</div></div><h4 id="BookPatternAppendix-SeeAlso">See Also</h4><ul><li><a 
shape="rect" href="bam.html">BAM</a></li></ul></div>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h2 id="BookPatternAppendix-ReturnAddress">Return 
Address</h2>
 
 <p>Camel supports the <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/ReturnAddress.html"; 
rel="nofollow">Return Address</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> by using the 
<code>JMSReplyTo</code> header.</p>
 
@@ -650,12 +650,12 @@ from("activemq:queue:bar?disableReplyTo=
 
 <p>For a complete example of this pattern, see this <a shape="rect" 
class="external-link" 
href="http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsInOnlyWithReplyToAsHeaderTest.java?view=markup";>junit
 test case</a></p>
 
-<h4 id="BookPatternAppendix-UsingThisPattern.10">Using This Pattern</h4>
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h4 
id="BookPatternAppendix-UsingThisPattern.10">Using This Pattern</h4>
 
-<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern out.</p>
+<p>If you would like to use this EIP Pattern then please read the <a 
shape="rect" href="getting-started.html">Getting Started</a>, you may also find 
the <a shape="rect" href="architecture.html">Architecture</a> useful 
particularly the description of <a shape="rect" 
href="endpoint.html">Endpoint</a> and <a shape="rect" 
href="uris.html">URIs</a>. Then you could try out some of the <a shape="rect" 
href="examples.html">Examples</a> first before trying this pattern 
out.</p></div></div>
 
 <h2 id="BookPatternAppendix-MessageRouting">Message Routing</h2>
-<h3 id="BookPatternAppendix-ContentBasedRouter">Content Based 
Router</h3><p>The <a shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/ContentBasedRouter.html"; 
rel="nofollow">Content Based Router</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> allows you to 
route messages to the correct destination based on the contents of the message 
exchanges.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/ContentBasedRouter.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/ContentBasedRouter.gif";></span></p><p>The
 following example shows how to route a request from an input 
<strong>seda:a</strong> endpoint to either <strong>seda:b</strong>, 
<strong>seda:c</strong> or <strong>seda:d</strong> depending on the evaluation 
of various <a shape="rect" href="predicate.html">Predicate<
 /a> expressions</p><p><strong>Using the <a shape="rect" 
href="fluent-builders.html">Fluent 
Builders</a></strong></p><p>&#160;</p><p><strong><br 
clear="none"></strong></p><div class="code panel pdl conf-macro output-block" 
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" 
data-macro-name="include"><h3 
id="BookPatternAppendix-ContentBasedRouter">Content Based Router</h3><p>The <a 
shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/ContentBasedRouter.html"; 
rel="nofollow">Content Based Router</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> allows you to 
route messages to the correct destination based on the contents of the message 
exchanges.</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/ContentBasedRouter.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/ContentBasedRouter.gif";></span></p><p>The
 following example shows how to route a request from an input 
<strong>seda:a</strong> endpoint to either <strong>seda:b</strong>, 
<strong>seda:c</strong> or <strong>seda:d</strong> dep
 ending on the evaluation of various <a shape="rect" 
href="predicate.html">Predicate</a> expressions</p><p><strong>Using the <a 
shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><p>&#160;</p><p><strong><br 
clear="none"></strong></p><div class="code panel pdl conf-macro output-block" 
data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; 
gutter: false; theme: Default" data-theme="Default">RouteBuilder builder = new 
RouteBuilder() {
     public void configure() {
         errorHandler(deadLetterChannel("mock:error"));
@@ -689,10 +689,10 @@ from("activemq:queue:bar?disableReplyTo=
         &lt;/choice&gt;
     &lt;/route&gt;
 &lt;/camelContext&gt;</pre>

[... 409 lines stripped ...]

Reply via email to