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 Wed Sep 16 
14:19:38 2015
@@ -1069,7 +1069,7 @@ public String slip(String body, @Propert
 </div></div><p>In the above we can use the <a shape="rect" 
href="parameter-binding-annotations.html">Parameter Binding Annotations</a> to 
bind different parts of the <a shape="rect" href="message.html">Message</a> to 
method parameters or use an <a shape="rect" 
href="expression.html">Expression</a> such as using <a shape="rect" 
href="xpath.html">XPath</a> or <a shape="rect" 
href="xquery.html">XQuery</a>.</p><p>The method can be invoked in a number of 
ways as described in the <a shape="rect" href="bean-integration.html">Bean 
Integration</a> such as</p><ul><li><a shape="rect" 
href="pojo-producing.html">POJO Producing</a></li><li><a shape="rect" 
href="spring-remoting.html">Spring Remoting</a></li><li><a shape="rect" 
href="bean.html">Bean</a> component</li></ul><p></p><h4 
id="BookPatternAppendix-UsingThisPattern.16">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-RecipientList">Recipient List</h3><p>The <a 
shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/RecipientList.html"; 
rel="nofollow">Recipient List</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> allows you to 
route messages to a number of dynamically specified recipients.</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image 
confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/RecipientList.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/RecipientList.gif";></span></p><p>The
 recipients will receive a copy of the <strong>same</strong> <a shape="rect" 
href="exchange.html">Exchange</a>, and Camel will execute them 
sequentially.</p><h3 id="BookPatternAppendix-Options.1">Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" ro
 wspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>delimiter</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>,</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Delimiter used if the <a 
shape="rect" href="expression.html">Expression</a> returned multiple endpoints. 
<strong>Camel 2.13</strong> can be disabled using "false"</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyRef</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>An <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 that will 
 assemble the replies from recipients into a single outgoing message from the 
<a shape="rect" href="recipient-list.html">Recipient List</a>. By default Camel 
will use the last reply as the outgoing message. From <strong>Camel 
2.12</strong> onwards you can also use a POJO as the 
<code>AggregationStrategy</code>, see the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodName</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.12:</strong> This option can be used to 
explicit declare the method name to use, when using POJOs as the 
<code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodAllowNull</code></p></td><td 
colspan="1" ro
 wspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> If this option 
is <code>false</code> then the aggregate method is not used if there was no 
data to enrich. If this option is <code>true</code> then <code>null</code> 
values is used as the <code>oldExchange</code> (when no data to enrich), when 
using POJOs as the <code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>parallelProcessing</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> If enabled, 
messages are sent to the recipients concurrently. Note that the calling thread 
will still wait until all messages have been fully processed before it 
continues; it's the sending and processing 
 of replies from recipients which happens in parallel.</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>parallelAggregate</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14:</strong> If 
enabled then the <code>aggregate</code> method on 
<code>AggregationStrategy</code> can be called concurrently. Notice that this 
would require the implementation of <code>AggregationStrategy</code> to be 
implemented as thread-safe. By default this is <code>false</code> meaning that 
Camel synchronizes the call to the <code>aggregate</code> method. Though in 
some use-cases this can be used to archive higher performance when the 
<code>AggregationStrategy</code> is implemented as 
thread-safe.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>executorServiceRef</code></p></td><td
  colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> A 
custom <a shape="rect" href="threading-model.html">Thread Pool</a> to use for 
parallel processing. Note that enabling this option implies parallel 
processing, so you need not enable that option as well.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>stopOnException</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> Whether to 
immediately stop processing when an exception occurs. If disabled, Camel will 
send the message to all recipients regardless of any individual failures. You 
can process exceptions in an <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
  implementation, which supports full control of error 
handling.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>ignoreInvalidEndpoints</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> 
Whether to ignore an endpoint URI that could not be resolved. If disabled, 
Camel will throw an exception identifying the invalid endpoint 
URI.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>streaming</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> If enabled, 
Camel will process replies out-of-order - that is, in the order received in 
reply from each recipient. If disabled, Camel will process replies in the same 
order as specified by the <a shape="rect" 
href="expression.html">Expression</a>.</p></td></t
 r><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>timeout</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.5:</strong> Specifies a processing 
timeout milliseconds. If the <a shape="rect" 
href="recipient-list.html">Recipient List</a> hasn't been able to send and 
process all replies within this timeframe, then the timeout triggers and the <a 
shape="rect" href="recipient-list.html">Recipient List</a> breaks out, with 
message flow continuing to the next element. Note that if you provide a <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/TimeoutAwareAggregationStrategy.html";>TimeoutAwareAggregationStrategy</a>,
 its <code>timeout</code> method is invoked before breaking out. 
<strong>Beware:</strong> If the timeout is reached with running tasks still 
remaining, certain tasks for which it i
 s difficult for Camel to shut down in a graceful manner may continue to run. 
So use this option with a bit of care. We may be able to improve this 
functionality in future Camel releases.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>onPrepareRef</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> A custom <a 
shape="rect" href="processor.html">Processor</a> to prepare the copy of the <a 
shape="rect" href="exchange.html">Exchange</a> each recipient will receive. 
This allows you to perform arbitrary transformations, such as deep-cloning the 
message payload (or any other custom logic).</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>shareUnitOfWork</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Whet
 her the unit of work should be shared. See <a shape="rect" 
href="splitter.html#Splitter-Sharingunitofwork">the same option on Splitter</a> 
for more details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>cacheSize</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.13.1/2.12.4:</strong> 
Allows to configure the cache size for the <code>ProducerCache</code> which 
caches producers for reuse in the recipient list. Will by default use the 
default cache size which is 1000. Setting the value to -1 allows to turn off 
the cache all together.</p></td></tr></tbody></table></div></div><h4 
id="BookPatternAppendix-StaticRecipientList">Static Recipient List</h4><p>The 
following example shows how to route a request from an input 
<strong>queue:a</strong> endpoint to a static list of 
destinations</p><p><strong>Using Annotations</strong><br clear="none"> You can 
use 
 the <a shape="rect" href="recipientlist-annotation.html">RecipientList 
Annotation</a> on a POJO to create a Dynamic Recipient List. For more details 
see the <a shape="rect" href="bean-integration.html">Bean 
Integration</a>.</p><p><strong>Using the <a shape="rect" 
href="fluent-builders.html">Fluent Builders</a></strong></p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<h3 id="BookPatternAppendix-RecipientList">Recipient List</h3><p>The <a 
shape="rect" class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/RecipientList.html"; 
rel="nofollow">Recipient List</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> allows you to 
route messages to a number of dynamically specified recipients.</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image 
confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/RecipientList.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/RecipientList.gif";></span></p><p>The
 recipients will receive a copy of the <strong>same</strong> <a shape="rect" 
href="exchange.html">Exchange</a>, and Camel will execute them 
sequentially.</p><h3 id="BookPatternAppendix-Options.1">Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" ro
 wspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>delimiter</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>,</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Delimiter used if the <a 
shape="rect" href="expression.html">Expression</a> returned multiple endpoints. 
<strong>Camel 2.13</strong> can be disabled using "false"</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyRef</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>An <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 that will 
 assemble the replies from recipients into a single outgoing message from the 
<a shape="rect" href="recipient-list.html">Recipient List</a>. By default Camel 
will use the last reply as the outgoing message. From <strong>Camel 
2.12</strong> onwards you can also use a POJO as the 
<code>AggregationStrategy</code>, see the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more details. If an exception is 
thrown from the aggregate method in the AggregationStrategy, then by default, 
that exception&#160;is not handled by the error handler. The error handler can 
be enabled to react if enabling the shareUnitOfWork 
option.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodName</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.12:</strong> This option can be used to 
explicit declare the method name to use, when using POJOs as the <code>Aggregati
 onStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodAllowNull</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> If 
this option is <code>false</code> then the aggregate method is not used if 
there was no data to enrich. If this option is <code>true</code> then 
<code>null</code> values is used as the <code>oldExchange</code> (when no data 
to enrich), when using POJOs as the <code>AggregationStrategy</code>. See the 
<a shape="rect" href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>parallelProcessing</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd">
 <p><strong>Camel 2.2:</strong> If enabled, messages are sent to the recipients 
concurrently. Note that the calling thread will still wait until all messages 
have been fully processed before it continues; it's the sending and processing 
of replies from recipients which happens in parallel.</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>parallelAggregate</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14:</strong> If 
enabled then the <code>aggregate</code> method on 
<code>AggregationStrategy</code> can be called concurrently. Notice that this 
would require the implementation of <code>AggregationStrategy</code> to be 
implemented as thread-safe. By default this is <code>false</code> meaning that 
Camel synchronizes the call to the <code>aggregate</code> method. Though in 
some use-ca
 ses this can be used to archive higher performance when the 
<code>AggregationStrategy</code> is implemented as 
thread-safe.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>executorServiceRef</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.2:</strong> A custom <a shape="rect" 
href="threading-model.html">Thread Pool</a> to use for parallel processing. 
Note that enabling this option implies parallel processing, so you need not 
enable that option as well.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>stopOnException</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> Whether to 
immediately stop processing when an exception occurs. If disabled, Camel will 
send the message to all recipients regardless of any indiv
 idual failures. You can process exceptions in an <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 implementation, which supports full control of error 
handling.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>ignoreInvalidEndpoints</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> 
Whether to ignore an endpoint URI that could not be resolved. If disabled, 
Camel will throw an exception identifying the invalid endpoint 
URI.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>streaming</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> If enabled, 
Camel will 
 process replies out-of-order - that is, in the order received in reply from 
each recipient. If disabled, Camel will process replies in the same order as 
specified by the <a shape="rect" 
href="expression.html">Expression</a>.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>timeout</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Specifies a 
processing timeout milliseconds. If the <a shape="rect" 
href="recipient-list.html">Recipient List</a> hasn't been able to send and 
process all replies within this timeframe, then the timeout triggers and the <a 
shape="rect" href="recipient-list.html">Recipient List</a> breaks out, with 
message flow continuing to the next element. Note that if you provide a <a 
shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/TimeoutAwareAggreg
 ationStrategy.html">TimeoutAwareAggregationStrategy</a>, its 
<code>timeout</code> method is invoked before breaking out. 
<strong>Beware:</strong> If the timeout is reached with running tasks still 
remaining, certain tasks for which it is difficult for Camel to shut down in a 
graceful manner may continue to run. So use this option with a bit of care. We 
may be able to improve this functionality in future Camel 
releases.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>onPrepareRef</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.8:</strong> A custom <a shape="rect" 
href="processor.html">Processor</a> to prepare the copy of the <a shape="rect" 
href="exchange.html">Exchange</a> each recipient will receive. This allows you 
to perform arbitrary transformations, such as deep-cloning the message payload 
(or any other custom logic).</p></td></tr><tr><td colspan="1" 
 rowspan="1" class="confluenceTd"><p><code>shareUnitOfWork</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> 
Whether the unit of work should be shared. See <a shape="rect" 
href="splitter.html#Splitter-Sharingunitofwork">the same option on Splitter</a> 
for more details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>cacheSize</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.13.1/2.12.4:</strong> 
Allows to configure the cache size for the <code>ProducerCache</code> which 
caches producers for reuse in the recipient list. Will by default use the 
default cache size which is 1000. Setting the value to -1 allows to turn off 
the cache all together.</p></td></tr></tbody></table></div></div><h4 
id="BookPatternAppendix-StaticRecipientL
 ist">Static Recipient List</h4><p>The following example shows how to route a 
request from an input <strong>queue:a</strong> endpoint to a static list of 
destinations</p><p><strong>Using Annotations</strong><br clear="none"> You can 
use the <a shape="rect" href="recipientlist-annotation.html">RecipientList 
Annotation</a> on a POJO to create a Dynamic Recipient List. For more details 
see the <a shape="rect" href="bean-integration.html">Bean 
Integration</a>.</p><p><strong>Using the <a shape="rect" 
href="fluent-builders.html">Fluent Builders</a></strong></p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 RouteBuilder builder = new RouteBuilder() {
     public void configure() {
@@ -1263,7 +1263,7 @@ from(&quot;direct:c&quot;).to(&quot;mock
 </div></div><div class="confluence-information-macro 
confluence-information-macro-note"><span class="aui-icon aui-icon-small 
aui-iconfont-warning confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>The recipient list will not alter 
the original exchange pattern. So in the example above the exchange pattern 
will still be InOnly when the message is routed to the file:outbox 
endpoint.</p><p>If you want to alter the exchange pattern permanently then use 
the .setExchangePattern option. See more details at <a shape="rect" 
href="request-reply.html">Request Reply</a> and <a shape="rect" 
href="event-message.html">Event 
Message</a>.</p></div></div><p>&#160;</p><p>&#160;</p><p></p><h4 
id="BookPatternAppendix-UsingThisPattern.17">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-Splitter">Splitter</h3><p>The <a shape="rect" 
class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/Sequencer.html"; 
rel="nofollow">Splitter</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> allows you split a 
message into a number of pieces and process them individually</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image 
confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/Sequencer.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/Sequencer.gif";></span></p><p>You
 need to specify a Splitter as <code>split()</code>. In earlier versions of 
Camel, you need to use <code>splitter()</code>.</p><h3 
id="BookPatternAppendix-Options.2">Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colsp
 an="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th 
colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>strategyRef</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Refers to an <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 to be used to assemble the replies from the sub-messages, into a single 
outgoing message from the <a shape="rect" href="splitter.html">Splitter</a>. 
See the defaults described below in <em><a shape="rect" 
href="#BookPatternAppendix-WhattheSplitterreturns">What the Splitter 
returns</a></em>. From <strong>Camel 2.12</strong> onwards you can also use a 
POJO as the <code>AggregationStrategy</code>, see the <a shape="rect" 
href="aggregator2.html">
 Aggregate</a> page for more details.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>strategyMethodName</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> This option 
can be used to explicit declare the method name to use, when using POJOs as the 
<code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodAllowNull</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> If 
this option is <code>false</code> then the aggregate method is not used for the 
very first splitted message. If this option is <code>true</code> then 
<code>null</code> values is used as the <code>oldExchange</code> 
 (for the very first message splitted), when using POJOs as the 
<code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>parallelProcessing</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If enabled then processing the sub-messages 
occurs concurrently. Note the caller thread will still wait until all 
sub-messages has been fully processed, before it continues.</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>parallelAggregate</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.14:</strong> If enabled 
then the <code>aggregate</code> method on <code>Aggrega
 tionStrategy</code> can be called concurrently. Notice that this would require 
the implementation of <code>AggregationStrategy</code> to be implemented as 
thread-safe. By default this is <code>false</code> meaning that Camel 
synchronizes the call to the <code>aggregate</code> method. Though in some 
use-cases this can be used to archive higher performance when the 
<code>AggregationStrategy</code> is implemented as 
thread-safe.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>executorServiceRef</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Refers to a custom <a shape="rect" 
href="threading-model.html">Thread Pool</a> to be used for parallel processing. 
Notice if you set this option, then parallel processing is automatically 
implied, and you do not have to enable that option as 
well.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>stopOnException<
 /code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.2:</strong> Whether or not to stop 
continue processing immediately when an exception occurred. If disable, then 
Camel continue splitting and process the sub-messages regardless if one of them 
failed. You can deal with exceptions in the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 class where you have full control how to handle that.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>streaming</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If enabled then Camel will split in a 
streaming fashion, which means it will split the input message in chunks. This 
reduces t
 he memory overhead. For example if you split big messages its recommended to 
enable streaming. If streaming is enabled then the sub-message replies will be 
aggregated out-of-order, eg in the order they come back. If disabled, Camel 
will process sub-message replies in the same order as they where 
splitted.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>timeout</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.5:</strong> Sets a total timeout 
specified in millis. If the <a shape="rect" 
href="recipient-list.html">Recipient List</a> hasn't been able to split and 
process all replies within the given timeframe, then the timeout triggers and 
the <a shape="rect" href="splitter.html">Splitter</a> breaks out and continues. 
Notice if you provide a <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/proc
 
essor/aggregate/TimeoutAwareAggregationStrategy.html">TimeoutAwareAggregationStrategy</a>
 then the <code>timeout</code> method is invoked before breaking out. If the 
timeout is reached with running tasks still remaining, certain tasks for which 
it is difficult for Camel to shut down in a graceful manner may continue to 
run. So use this option with a bit of care. We may be able to improve this 
functionality in future Camel releases.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>onPrepareRef</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Refers to a 
custom <a shape="rect" href="processor.html">Processor</a> to prepare the 
sub-message of the <a shape="rect" href="exchange.html">Exchange</a>, before 
its processed. This allows you to do any custom logic, such as deep-cloning the 
message payload if that's needed etc.</p></td></tr><tr><td colspan="
 1" rowspan="1" 
class="confluenceTd"><p><code>shareUnitOfWork</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Whether the 
unit of work should be shared. See further below for more 
details.</p></td></tr></tbody></table></div></div><h3 
id="BookPatternAppendix-Exchangeproperties">Exchange properties</h3><p>The 
following properties are set on each Exchange that are split:</p><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" class="confluenceTh"><p>property</p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p>type</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>CamelSplitIndex</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>int</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>A split coun
 ter that increases for each Exchange being split. The counter starts from 
0.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelSplitSize</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>int</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The total number of Exchanges that was splitted. This 
header is not applied for stream based splitting. From <strong>Camel 
2.9</strong> onwards this header is also set in stream based splitting, but 
only on the completed Exchange.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelSplitComplete</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.4:</strong> Whether or not this 
Exchange is the last.</p></td></tr></tbody></table></div><h3 
id="BookPatternAppendix-Examples">Examples</h3><p>The following example shows 
how to take a request from the <strong>direct:a</str
 ong> endpoint the split it into pieces using an <a shape="rect" 
href="expression.html">Expression</a>, then forward each piece to 
<strong>direct:b</strong></p><p><strong>Using the <a shape="rect" 
href="fluent-builders.html">Fluent Builders</a></strong></p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<h3 id="BookPatternAppendix-Splitter">Splitter</h3><p>The <a shape="rect" 
class="external-link" 
href="http://www.enterpriseintegrationpatterns.com/Sequencer.html"; 
rel="nofollow">Splitter</a> from the <a shape="rect" 
href="enterprise-integration-patterns.html">EIP patterns</a> allows you split a 
message into a number of pieces and process them individually</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image 
confluence-external-resource" 
src="http://www.enterpriseintegrationpatterns.com/img/Sequencer.gif"; 
data-image-src="http://www.enterpriseintegrationpatterns.com/img/Sequencer.gif";></span></p><p>You
 need to specify a Splitter as <code>split()</code>. In earlier versions of 
Camel, you need to use <code>splitter()</code>.</p><h3 
id="BookPatternAppendix-Options.2">Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colsp
 an="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th 
colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>strategyRef</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Refers to an <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 to be used to assemble the replies from the sub-messages, into a single 
outgoing message from the <a shape="rect" href="splitter.html">Splitter</a>. 
See the defaults described below in <em><a shape="rect" 
href="#BookPatternAppendix-WhattheSplitterreturns">What the Splitter 
returns</a></em>. From <strong>Camel 2.12</strong> onwards you can also use a 
POJO as the <code>AggregationStrategy</code>, see the <a shape="rect" 
href="aggregator2.html">
 Aggregate</a> page for more details. If an exception is thrown from the 
aggregate method in the AggregationStrategy, then by default, that 
exception&#160;is not handled by the error handler. The error handler can be 
enabled to react if enabling the shareUnitOfWork option.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodName</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.12:</strong> This option can be used to 
explicit declare the method name to use, when using POJOs as the 
<code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodAllowNull</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Cam
 el 2.12:</strong> If this option is <code>false</code> then the aggregate 
method is not used for the very first splitted message. If this option is 
<code>true</code> then <code>null</code> values is used as the 
<code>oldExchange</code> (for the very first message splitted), when using 
POJOs as the <code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>parallelProcessing</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If enabled then processing the sub-messages 
occurs concurrently. Note the caller thread will still wait until all 
sub-messages has been fully processed, before it continues.</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>parallelAggregate</code
 ></p></td><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p><strong>Camel 2.14:</strong> If enabled 
 >then the <code>aggregate</code> method on <code>AggregationStrategy</code> 
 >can be called concurrently. Notice that this would require the implementation 
 >of <code>AggregationStrategy</code> to be implemented as thread-safe. By 
 >default this is <code>false</code> meaning that Camel synchronizes the call 
 >to the <code>aggregate</code> method. Though in some use-cases this can be 
 >used to archive higher performance when the <code>AggregationStrategy</code> 
 >is implemented as thread-safe.</p></td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>executorServiceRef</code></p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p>Refers to a custom <a 
 >shape="rect" href="threading-model.html">Thread Pool</a> to be used for 
 >parallel 
 processing. Notice if you set this option, then parallel processing is 
automatically implied, and you do not have to enable that option as 
well.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>stopOnException</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> Whether or not 
to stop continue processing immediately when an exception occurred. If disable, 
then Camel continue splitting and process the sub-messages regardless if one of 
them failed. You can deal with exceptions in the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 class where you have full control how to handle that.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>streaming</code></p></td><td colspan="1" rowsp
 an="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If enabled then Camel will split in a 
streaming fashion, which means it will split the input message in chunks. This 
reduces the memory overhead. For example if you split big messages its 
recommended to enable streaming. If streaming is enabled then the sub-message 
replies will be aggregated out-of-order, eg in the order they come back. If 
disabled, Camel will process sub-message replies in the same order as they 
where splitted.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>timeout</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.5:</strong> Sets a total timeout 
specified in millis. If the <a shape="rect" 
href="recipient-list.html">Recipient List</a> hasn't been able to split and 
process all replies within the given timeframe, then the timeout tri
 ggers and the <a shape="rect" href="splitter.html">Splitter</a> breaks out and 
continues. Notice if you provide a <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/TimeoutAwareAggregationStrategy.html";>TimeoutAwareAggregationStrategy</a>
 then the <code>timeout</code> method is invoked before breaking out. If the 
timeout is reached with running tasks still remaining, certain tasks for which 
it is difficult for Camel to shut down in a graceful manner may continue to 
run. So use this option with a bit of care. We may be able to improve this 
functionality in future Camel releases.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>onPrepareRef</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Refers to a 
custom <a shape="rect" href="processor.html">Processor</a> to p
 repare the sub-message of the <a shape="rect" 
href="exchange.html">Exchange</a>, before its processed. This allows you to do 
any custom logic, such as deep-cloning the message payload if that's needed 
etc.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>shareUnitOfWork</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Whether the 
unit of work should be shared. See further below for more 
details.</p></td></tr></tbody></table></div></div><h3 
id="BookPatternAppendix-Exchangeproperties">Exchange properties</h3><p>The 
following properties are set on each Exchange that are split:</p><div 
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" 
rowspan="1" class="confluenceTh"><p>property</p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p>type</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>descriptio
 n</p></th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelSplitIndex</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>int</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>A split counter that increases for each Exchange being 
split. The counter starts from 0.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelSplitSize</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>int</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The total number of Exchanges that was splitted. This 
header is not applied for stream based splitting. From <strong>Camel 
2.9</strong> onwards this header is also set in stream based splitting, but 
only on the completed Exchange.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelSplitComplete</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>boolean</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><st
 rong>Camel 2.4:</strong> Whether or not this Exchange is the 
last.</p></td></tr></tbody></table></div><h3 
id="BookPatternAppendix-Examples">Examples</h3><p>The following example shows 
how to take a request from the <strong>direct:a</strong> endpoint the split it 
into pieces using an <a shape="rect" href="expression.html">Expression</a>, 
then forward each piece to <strong>direct:b</strong></p><p><strong>Using the <a 
shape="rect" href="fluent-builders.html">Fluent Builders</a></strong></p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 RouteBuilder builder = new RouteBuilder() {
     public void configure() {
@@ -1275,7 +1275,7 @@ RouteBuilder builder = new RouteBuilder(
     }
 };
 ]]></script>
-</div></div><p>The splitter can use any <a shape="rect" 
href="expression.html">Expression</a> language so you could use any of the <a 
shape="rect" href="languages-supported.html">Languages Supported</a> such as <a 
shape="rect" href="xpath.html">XPath</a>, <a shape="rect" 
href="xquery.html">XQuery</a>, <a shape="rect" href="sql.html">SQL</a> or one 
of the <a shape="rect" href="scripting-languages.html">Scripting Languages</a> 
to perform the split. e.g.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+</div></div>The splitter can use any <a shape="rect" 
href="expression.html">Expression</a> language so you could use any of the <a 
shape="rect" href="languages-supported.html">Languages Supported</a> such as <a 
shape="rect" href="xpath.html">XPath</a>, <a shape="rect" 
href="xquery.html">XQuery</a>, <a shape="rect" href="sql.html">SQL</a> or one 
of the <a shape="rect" href="scripting-languages.html">Scripting Languages</a> 
to perform the split. e.g.<div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;activemq:my.queue&quot;).split(xpath(&quot;//foo/bar&quot;)).convertBodyTo(String.class).to(&quot;file://some/directory&quot;)
 ]]></script>
 </div></div><p><strong>Using the <a shape="rect" 
href="spring-xml-extensions.html">Spring XML Extensions</a></strong></p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
@@ -1290,10 +1290,10 @@ RouteBuilder builder = new RouteBuilder(
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div><p>For further examples of this pattern in use you could look at 
one of the <a shape="rect" class="external-link" 
href="http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java?view=markup";>junit
 test case</a></p><h3 
id="BookPatternAppendix-SplittingaCollection,IteratororArray">Splitting a 
Collection, Iterator or Array</h3><p>A common use case is to split a 
Collection, Iterator or Array from the <span 
class="confluence-link">message</span>. In the sample below we simply use 
an&#160;<a shape="rect" href="expression.html">Expression</a> to identify the 
value to split.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div>For further examples of this pattern in use you could look at one 
of the <a shape="rect" class="external-link" 
href="http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java?view=markup";>junit
 test case</a><h3 
id="BookPatternAppendix-SplittingaCollection,IteratororArray">Splitting a 
Collection, Iterator or Array</h3><p>A common use case is to split a 
Collection, Iterator or Array from the <span 
class="confluence-link">message</span>. In the sample below we simply use 
an&#160;<a shape="rect" href="expression.html">Expression</a> to identify the 
value to split.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:splitUsingBody&quot;).split(body()).to(&quot;mock:result&quot;);
 
-from(&quot;direct:splitUsingHeader&quot;).split(header(&quot;foo&quot;)).to(&quot;mock:result&quot;);?]]></script>
+from(&quot;direct:splitUsingHeader&quot;).split(header(&quot;foo&quot;)).to(&quot;mock:result&quot;);Â
 ]]></script>
 </div></div><p>In Spring XML you can use the <a shape="rect" 
href="simple.html">Simple</a> language to identify the value to split.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;split&gt;
    &lt;simple&gt;${body}&lt;/simple&gt;
@@ -1303,7 +1303,7 @@ from(&quot;direct:splitUsingHeader&quot;
 &lt;split&gt;
    &lt;simple&gt;${header.foo}&lt;/simple&gt;
    &lt;to uri=&quot;mock:result&quot;/&gt;
-&lt;/split&gt; ?]]></script>
+&lt;/split&gt;  ]]></script>
 </div></div><h3 id="BookPatternAppendix-UsingTokenizerfrom*">Using Tokenizer 
from <a shape="rect" href="spring-xml-extensions.html">Spring XML 
Extensions</a>*</h3><p>You can use the tokenizer expression in the Spring DSL 
to split bodies or headers using a token. This is a common use-case, so we 
provided a special <strong>tokenizer</strong> tag for this.<br clear="none"> In 
the sample below we split the body using a @ as separator. You can of course 
use comma or space or even a regex pattern, also set regex=true.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
@@ -1440,7 +1440,7 @@ from(&quot;direct:message&quot;)
         .split().method(&quot;mySplitterBean&quot;, &quot;splitMessage&quot;)
         .to(&quot;mock:result&quot;);
 ]]></script>
-</div></div><p>And the logic for our <a shape="rect" href="bean.html">Bean</a> 
is as simple as. Notice we use Camel <a shape="rect" 
href="bean-binding.html">Bean Binding</a> to pass in the message body as a 
String object.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div>And the logic for our <a shape="rect" href="bean.html">Bean</a> is 
as simple as. Notice we use Camel <a shape="rect" href="bean-binding.html">Bean 
Binding</a> to pass in the message body as a String object.<div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 public class MySplitterBean {
 
@@ -1509,7 +1509,7 @@ from(&quot;direct:start&quot;)
     // this bean will receive the result of the aggregate strategy: 
MyOrderStrategy
     .to(&quot;bean:MyOrderService?method=buildCombinedResponse&quot;)
 ]]></script>
-</div></div><p>And the OrderService bean is as follows:</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>And the OrderService bean is as follows:<div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 public static class MyOrderService {
 
@@ -1533,7 +1533,7 @@ public static class MyOrderService {
     }
 }
 ]]></script>
-</div></div><p>And our custom <strong>aggregationStrategy</strong> that is 
responsible for holding the in progress aggregated message that after the 
splitter is ended will be sent to the <strong>buildCombinedResponse</strong> 
method for final processing before the combined response can be returned to the 
waiting caller.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div>And our custom <strong>aggregationStrategy</strong> that is 
responsible for holding the in progress aggregated message that after the 
splitter is ended will be sent to the <strong>buildCombinedResponse</strong> 
method for final processing before the combined response can be returned to the 
waiting caller.<div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 /**
  * This is our own order aggregation strategy where we can control
@@ -1568,7 +1568,7 @@ public static class MyOrderStrategy impl
     }
 }
 ]]></script>
-</div></div><p>So lets run the sample and see how it works.<br clear="none"> 
We send an <a shape="rect" href="exchange.html">Exchange</a> to the 
<strong>direct:start</strong> endpoint containing a IN body with the String 
value: <code>A@B@C</code>. The flow is:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>So lets run the sample and see how it works.<br clear="none"> We 
send an <a shape="rect" href="exchange.html">Exchange</a> to the 
<strong>direct:start</strong> endpoint containing a IN body with the String 
value: <code>A@B@C</code>. The flow is:<div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[HandleOrder: A
 HandleOrder: B
 Aggregate old orders: (id=1,item=A)
@@ -1616,7 +1616,7 @@ from(&quot;direct:line&quot;)
     .process(new MyProcessor())
     .to(&quot;mock:line&quot;);
 ]]></script>
-</div></div><p>Now in this example what would happen is that in case there is 
a problem processing each sub message, the error handler will kick in (yes 
error handling still applies for the sub messages). <strong>But</strong> what 
doesn't happen is that if a sub message fails all redelivery attempts (its 
exhausted), then its <strong>not</strong> moved into that dead letter queue. 
The reason is that we have shared the unit of work, so the sub message will 
report the error on the shared unit of work. When the <a shape="rect" 
href="splitter.html">Splitter</a> is done, it checks the state of the shared 
unit of work and checks if any errors occurred. And if an error occurred it 
will set the exception on the <a shape="rect" href="exchange.html">Exchange</a> 
and mark it for rollback. The error handler will yet again kick in, as the <a 
shape="rect" href="exchange.html">Exchange</a> has been marked as rollback and 
it had an exception as well. No redelivery attempts is performed (as it was ma
 rked for rollback) and the <a shape="rect" href="exchange.html">Exchange</a> 
will be moved into the <a shape="rect" href="dead-letter-channel.html">dead 
letter queue</a>.</p><p>Using this from XML DSL is just as easy as you just 
have to set the shareUnitOfWork attribute to true:</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>Now in this example what would happen is that in case there is a 
problem processing each sub message, the error handler will kick in (yes error 
handling still applies for the sub messages). <strong>But</strong> what doesn't 
happen is that if a sub message fails all redelivery attempts (its exhausted), 
then its <strong>not</strong> moved into that dead letter queue. The reason is 
that we have shared the unit of work, so the sub message will report the error 
on the shared unit of work. When the <a shape="rect" 
href="splitter.html">Splitter</a> is done, it checks the state of the shared 
unit of work and checks if any errors occurred. And if an error occurred it 
will set the exception on the <a shape="rect" href="exchange.html">Exchange</a> 
and mark it for rollback. The error handler will yet again kick in, as the <a 
shape="rect" href="exchange.html">Exchange</a> has been marked as rollback and 
it had an exception as well. No redelivery attempts is performed (as it was 
marke
 d for rollback) and the <a shape="rect" href="exchange.html">Exchange</a> will 
be moved into the <a shape="rect" href="dead-letter-channel.html">dead letter 
queue</a>.<p>Using this from XML DSL is just as easy as you just have to set 
the shareUnitOfWork attribute to true:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;camelContext errorHandlerRef=&quot;dlc&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
 
@@ -1901,7 +1901,7 @@ public final class MyListOfNumbersStrate
 ]]></script>
 </div></div><h3 id="BookPatternAppendix-UsingAggregateController">Using 
AggregateController</h3><p><strong>Available as of Camel 
2.16</strong></p><p>The&#160;<code>org.apache.camel.processor.aggregate.AggregateController</code>
 allows you to control the aggregate at runtime using Java or JMX API. This can 
be used to force completing groups of exchanges, or query its current runtime 
statistics.</p><p>The aggregator provides a default implementation if no custom 
have been configured, which can be accessed 
using&#160;<code>getAggregateController()</code>&#160;method. Though it may be 
easier to configure a controller in the route using aggregateController as 
shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[private AggregateController controller = new 
DefaultAggregateController();
-?
+ 
 from(&quot;direct:start&quot;)
    .aggregate(header(&quot;id&quot;), new 
MyAggregationStrategy()).completionSize(10).id(&quot;myAggregator&quot;)
       .aggregateController(controller)
@@ -1912,7 +1912,7 @@ from(&quot;direct:start&quot;)
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[int groups = 
controller.forceCompletionOfAllGroups();]]></script>
 </div></div><p>&#160;</p><p>To configure this from XML DSL</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;myController&quot; 
class=&quot;org.apache.camel.processor.aggregate.DefaultAggregateController&quot;/&gt;
-?
+ 
   &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
         &lt;route&gt;
             &lt;from uri=&quot;direct:start&quot;/&gt;
@@ -3135,13 +3135,11 @@ public static class MyLoadBalancer exten
 </div></div><p></p><h4 id="BookPatternAppendix-UsingThisPattern.27">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-Multicast">Multicast</h3><p>The Multicast allows 
to route the same message to a number of endpoints and process them in a 
different way. The main difference between the Multicast and Splitter is that 
Splitter will split the message into several pieces but the Multicast will not 
modify the request message.</p><h3 
id="BookPatternAppendix-Options.7">Options</h3><div 
class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" 
rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>strategyRef</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Refers to an <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 to be used to assemble the replies from the multicasts, into a single outgoing 
message from the <a shape="rect" href="multicast.html">Multicast</a>. By 
default Camel will use the last reply as the outgoing message.  From 
<strong>Camel 2.12</strong> onwards you can also use a POJO as the <code>Agg
 regationStrategy</code>, see the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more details. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>strategyMethodName</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <strong>Camel 2.12:</strong> This option can be used 
to explicit declare the method name to use, when using POJOs as the 
<code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more details. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>strategyMethodAllowNull</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <strong>Camel 2.12:</strong> If this 
option is <code>false</code> then the aggregate method is not used if there was 
no data to enrich. If this option is <code>true
 </code> then <code>null</code> values is used as the <code>oldExchange</code> 
(when no data to enrich), when using POJOs as the 
<code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more details. 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>parallelProcessing</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> If enabled then sending messages to the 
multicasts occurs concurrently. Note the caller thread will still wait until 
all messages has been fully processed, before it continues. Its only the 
sending and processing the replies from the multicasts which happens 
concurrently. </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>parallelAggregate</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> 
 <code>false</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <strong>Camel 2.14:</strong> If enabled then the 
<code>aggregate</code> method on <code>AggregationStrategy</code> can be called 
concurrently. Notice that this would require the implementation of 
<code>AggregationStrategy</code> to be implemented as thread-safe. By default 
this is <code>false</code> meaning that Camel synchronizes the call to the 
<code>aggregate</code> method. Though in some use-cases this can be used to 
archive higher performance when the <code>AggregationStrategy</code> is 
implemented as thread-safe. </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>executorServiceRef</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> Refers to a custom <a shape="rect" 
href="threading-model.html">Thread Pool</a> to be used for parallel processing. 
Notice if you set this option, then parallel
  processing is automatic implied, and you do not have to enable that option as 
well. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>stopOnException</code> </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <strong>Camel 2.2:</strong> Whether or not 
to stop continue processing immediately when an exception occurred. If disable, 
then Camel will send the message to all multicasts regardless if one of them 
failed. You can deal with exceptions in the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 class where you have full control how to handle that. </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <code>streaming</code> 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
<code>false</code> </p></td
 ><td colspan="1" rowspan="1" class="confluenceTd"><p> If enabled then Camel 
 >will process replies out-of-order, eg in the order they come back. If 
 >disabled, Camel will process replies in the same order as multicasted. 
 ></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
 ><code>timeout</code> </p></td><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p> <strong>Camel 2.5:</strong> Sets a total timeout 
 >specified in millis. If the <a shape="rect" 
 >href="multicast.html">Multicast</a> hasn't been able to send and process all 
 >replies within the given timeframe, then the timeout triggers and the <a 
 >shape="rect" href="multicast.html">Multicast</a> breaks out and continues. 
 >Notice if you provide a <a shape="rect" class="external-link" 
 >href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/TimeoutAwareAggregationStrategy.html";>TimeoutAwareAggregationStrategy</a>
 > then 
 the <code>timeout</code> method is invoked before breaking out. If the timeout 
is reached with running tasks still remaining, certain tasks for which it is 
difficult for Camel to shut down in a graceful manner may continue to run.  So 
use this option with a bit of care.  We may be able to improve this 
functionality in future Camel releases. </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>onPrepareRef</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> Refers to a 
custom <a shape="rect" href="processor.html">Processor</a> to prepare the copy 
of the <a shape="rect" href="exchange.html">Exchange</a> each multicast will 
receive. This allows you to do any custom logic, such as deep-cloning the 
message payload if that's needed etc. </p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p> <code>shareUnitOfWork</code> </p></td><td 
colspan
 ="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> 
Whether the unit of work should be shared. See the same option on <a 
shape="rect" href="splitter.html">Splitter</a> for more details. 
</p></td></tr></tbody></table></div>
-</div><h4 id="BookPatternAppendix-Example.4">Example</h4><p>The following 
example shows how to take a request from the <strong>direct:a</strong> endpoint 
, then multicast these request to <strong>direct:x</strong>, 
<strong>direct:y</strong>, <strong>direct:z</strong>.</p><p><strong>Using the 
<a shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<h3 id="BookPatternAppendix-Multicast">Multicast</h3><p>The Multicast allows 
to route the same message to a number of endpoints and process them in a 
different way. The main difference between the Multicast and Splitter is that 
Splitter will split the message into several pieces but the Multicast will not 
modify the request message.</p><h3 
id="BookPatternAppendix-Options.7">Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>strategyRef</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Refers to an <a shape="rect" 
class="external-link" href="http://camel.apache.org/mav
 
en/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html">AggregationStrategy</a>
 to be used to assemble the replies from the multicasts, into a single outgoing 
message from the <a shape="rect" href="multicast.html">Multicast</a>. By 
default Camel will use the last reply as the outgoing message. From 
<strong>Camel 2.12</strong> onwards you can also use a POJO as the 
<code>AggregationStrategy</code>, see the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more details. If an exception is 
thrown from the aggregate method in the AggregationStrategy, then by default, 
that exception&#160;is not handled by the error handler. The error handler can 
be enabled to react if enabling the shareUnitOfWork 
option.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodName</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Ca
 mel 2.12:</strong> This option can be used to explicit declare the method name 
to use, when using POJOs as the <code>AggregationStrategy</code>. See the <a 
shape="rect" href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodAllowNull</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> If 
this option is <code>false</code> then the aggregate method is not used if 
there was no data to enrich. If this option is <code>true</code> then 
<code>null</code> values is used as the <code>oldExchange</code> (when no data 
to enrich), when using POJOs as the <code>AggregationStrategy</code>. See the 
<a shape="rect" href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>parallelProcessing</code></p></td><t
 d colspan="1" rowspan="1" 
class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>If enabled then sending messages to the multicasts 
occurs concurrently. Note the caller thread will still wait until all messages 
has been fully processed, before it continues. Its only the sending and 
processing the replies from the multicasts which happens 
concurrently.</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>parallelAggregate</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.14:</strong> If enabled 
then the <code>aggregate</code> method on <code>AggregationStrategy</code> can 
be called concurrently. Notice that this would require the implementation of 
<code>AggregationStrategy</code> to be implemented as thread-safe. By default 
this is <code>f
 alse</code> meaning that Camel synchronizes the call to the 
<code>aggregate</code> method. Though in some use-cases this can be used to 
archive higher performance when the <code>AggregationStrategy</code> is 
implemented as thread-safe.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>executorServiceRef</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Refers to a custom <a shape="rect" 
href="threading-model.html">Thread Pool</a> to be used for parallel processing. 
Notice if you set this option, then parallel processing is automatic implied, 
and you do not have to enable that option as well.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>stopOnException</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.2:</strong> Whether or not 
to stop c
 ontinue processing immediately when an exception occurred. If disable, then 
Camel will send the message to all multicasts regardless if one of them failed. 
You can deal with exceptions in the <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/AggregationStrategy.html";>AggregationStrategy</a>
 class where you have full control how to handle that.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>streaming</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>If enabled then Camel will process replies 
out-of-order, eg in the order they come back. If disabled, Camel will process 
replies in the same order as multicasted.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>timeout</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td 
 colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> 
Sets a total timeout specified in millis. If the <a shape="rect" 
href="multicast.html">Multicast</a> hasn't been able to send and process all 
replies within the given timeframe, then the timeout triggers and the <a 
shape="rect" href="multicast.html">Multicast</a> breaks out and continues. 
Notice if you provide a <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/processor/aggregate/TimeoutAwareAggregationStrategy.html";>TimeoutAwareAggregationStrategy</a>
 then the <code>timeout</code> method is invoked before breaking out. If the 
timeout is reached with running tasks still remaining, certain tasks for which 
it is difficult for Camel to shut down in a graceful manner may continue to 
run. So use this option with a bit of care. We may be able to improve this 
functionality in future Camel releases.</p></td></tr><tr><td colspan="1" 
rowspan="1" clas
 s="confluenceTd"><p><code>onPrepareRef</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.8:</strong> Refers to a custom <a 
shape="rect" href="processor.html">Processor</a> to prepare the copy of the <a 
shape="rect" href="exchange.html">Exchange</a> each multicast will receive. 
This allows you to do any custom logic, such as deep-cloning the message 
payload if that's needed etc.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>shareUnitOfWork</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Whether the 
unit of work should be shared. See the same option on <a shape="rect" 
href="splitter.html">Splitter</a> for more 
details.</p></td></tr></tbody></table></div></div><h4 
id="BookPatternAppendix-Example.4">Example</h4><p>The following example 
 shows how to take a request from the <strong>direct:a</strong> endpoint , then 
multicast these request to <strong>direct:x</strong>, 
<strong>direct:y</strong>, <strong>direct:z</strong>.</p><p><strong>Using the 
<a shape="rect" href="fluent-builders.html">Fluent 
Builders</a></strong></p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 from(&quot;direct:a&quot;).multicast().to(&quot;direct:x&quot;, 
&quot;direct:y&quot;, &quot;direct:z&quot;);
 ]]></script>
-</div></div><p>By default Multicast invokes each endpoint sequentially. If 
parallel processing is desired, simply use</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>By default Multicast invokes each endpoint sequentially. If 
parallel processing is desired, simply use<div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:a&quot;).multicast().parallelProcessing().to(&quot;direct:x&quot;,
 &quot;direct:y&quot;, &quot;direct:z&quot;);
 ]]></script>
 </div></div><p>In case of using InOut MEP, an AggregationStrategy is used for 
aggregating all reply messages. The default is to only use the latest reply 
message and discard any earlier replies. The aggregation strategy is 
configurable:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
@@ -3235,7 +3233,7 @@ public class Animal implements Serializa
     }
 }
 ]]></script>
-</div></div><p>Then we can create a deep clone processor which clones the 
message body:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 
1px;"><b>AnimalDeepClonePrepare</b></div><div class="codeContent panelContent 
pdl">
+</div></div>Then we can create a deep clone processor which clones the message 
body:<div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 
1px;"><b>AnimalDeepClonePrepare</b></div><div class="codeContent panelContent 
pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 public class AnimalDeepClonePrepare implements Processor {
 
@@ -3248,12 +3246,12 @@ public class AnimalDeepClonePrepare impl
     }
 }
 ]]></script>
-</div></div><p>Then we can use the AnimalDeepClonePrepare class in the <a 
shape="rect" href="multicast.html">Multicast</a> route using the 
<code>onPrepare</code> option as shown:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>Multicast using onPrepare</b></div><div 
class="codeContent panelContent pdl">
+</div></div>Then we can use the AnimalDeepClonePrepare class in the <a 
shape="rect" href="multicast.html">Multicast</a> route using the 
<code>onPrepare</code> option as shown:<div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>Multicast using onPrepare</b></div><div 
class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 from(&quot;direct:start&quot;)
     .multicast().onPrepare(new 
AnimalDeepClonePrepare()).to(&quot;direct:a&quot;).to(&quot;direct:b&quot;);
 ]]></script>
-</div></div><p>And the same example in XML DSL</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>Multicast using onPrepare</b></div><div 
class="codeContent panelContent pdl">
+</div></div>And the same example in XML DSL<div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>Multicast using onPrepare</b></div><div 
class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;route&gt;
@@ -3284,7 +3282,7 @@ from(&quot;direct:start&quot;)
 &lt;bean id=&quot;processorA&quot; 
class=&quot;org.apache.camel.processor.MulticastOnPrepareTest$ProcessorA&quot;/&gt;
 &lt;bean id=&quot;processorB&quot; 
class=&quot;org.apache.camel.processor.MulticastOnPrepareTest$ProcessorB&quot;/&gt;
 ]]></script>
-</div></div><p>Notice the <code>onPrepare</code> option is also available on 
other <a shape="rect" href="eip.html">EIP</a>s such as <a shape="rect" 
href="splitter.html">Splitter</a>, <a shape="rect" 
href="recipient-list.html">Recipient List</a>, and <a shape="rect" 
href="wire-tap.html">Wire Tap</a>.</p><p></p><h4 
id="BookPatternAppendix-UsingThisPattern.28">Using This Pattern</h4>
+</div></div>Notice the <code>onPrepare</code> option is also available on 
other <a shape="rect" href="eip.html">EIP</a>s such as <a shape="rect" 
href="splitter.html">Splitter</a>, <a shape="rect" 
href="recipient-list.html">Recipient List</a>, and <a shape="rect" 
href="wire-tap.html">Wire Tap</a>.<p></p><h4 
id="BookPatternAppendix-UsingThisPattern.28">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-Loop">Loop</h2>
@@ -4809,7 +4807,7 @@ from(&quot;direct:tap&quot;)
             &lt;constructor-arg value=&quot;com.mycompany.mylogger&quot; /&gt;
         &lt;/bean&gt;
 
-       ?&lt;route id=&quot;moo&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+        &lt;route id=&quot;moo&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
             &lt;from uri=&quot;direct:moo&quot;/&gt;
             &lt;log message=&quot;Me Got ${body}&quot; 
loggingLevel=&quot;INFO&quot; loggerRef=&quot;myLogger&quot;/&gt;
             &lt;to uri=&quot;mock:baz&quot;/&gt;

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.


Reply via email to