camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r907787 [4/6] - in /websites/production/camel/content: ./ 2014/05/ 2014/05/02/ cache/
Date Fri, 02 May 2014 17:21:35 GMT
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 Fri May  2 17:21:34 2014
@@ -1195,51 +1195,22 @@ from("direct:start")
 </div></div><h4 id="BookPatternAppendix-Knowingifwasfilteredornot">Knowing if <a shape="rect" href="exchange.html">Exchange</a> was filtered or not</h4><p><strong>Available as of Camel 2.5</strong></p><p>The <a shape="rect" href="message-filter.html">Message Filter</a> EIP will add a property on the <a shape="rect" href="exchange.html">Exchange</a> that states if it was filtered or not.</p><p>The property has the key <code>Exchange.FILTER_MATCHED</code>, which has the String value of <code>CamelFilterMatched</code>. Its value is a boolean indicating <code>true</code> or <code>false</code>. If the value is <code>true</code> then the <a shape="rect" href="exchange.html">Exchange</a> was routed in the filter block. This property will be visible within the <a shape="rect" href="message-filter.html">Message Filter</a> block who's <a shape="rect" href="predicate.html">Predicate</a> matches (value set to <code>true</code>), and to the steps immediately following the <a shape="rect" href="m
 essage-filter.html">Message Filter</a> with the value set based on the results of the last <a shape="rect" href="message-filter.html">Message Filter</a> <a shape="rect" href="predicate.html">Predicate</a> evaluated.</p><p></p><h4 id="BookPatternAppendix-UsingThisPattern.15">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-DynamicRouter">Dynamic Router</h2>
-
-<p>The <a shape="rect" class="external-link" href="http://www.enterpriseintegrationpatterns.com/DynamicRouter.html" rel="nofollow">Dynamic Router</a> from the <a shape="rect" href="enterprise-integration-patterns.html">EIP patterns</a> allows you to route messages while avoiding the dependency of the router on all possible destinations while maintaining its efficiency.</p>
-
-<p><img class="confluence-embedded-image confluence-external-resource" src="http://www.enterpriseintegrationpatterns.com/img/DynamicRouter.gif" data-image-src="http://www.enterpriseintegrationpatterns.com/img/DynamicRouter.gif"></p>
-
-<p>In <strong>Camel 2.5</strong> we introduced a <code>dynamicRouter</code> in the DSL which is like a dynamic <a shape="rect" href="routing-slip.html">Routing Slip</a> which evaluates the slip <em>on-the-fly</em>. </p>
-
-    <div class="aui-message problem shadowed information-macro">
+<h2 id="BookPatternAppendix-DynamicRouter">Dynamic Router</h2><p>The <a shape="rect" class="external-link" href="http://www.enterpriseintegrationpatterns.com/DynamicRouter.html" rel="nofollow">Dynamic Router</a> from the <a shape="rect" href="enterprise-integration-patterns.html">EIP patterns</a> allows you to route messages while avoiding the dependency of the router on all possible destinations while maintaining its efficiency.</p><p><img class="confluence-embedded-image confluence-external-resource" src="http://www.enterpriseintegrationpatterns.com/img/DynamicRouter.gif" data-image-src="http://www.enterpriseintegrationpatterns.com/img/DynamicRouter.gif"></p><p>In <strong>Camel 2.5</strong> we introduced a <code>dynamicRouter</code> in the DSL which is like a dynamic <a shape="rect" href="routing-slip.html">Routing Slip</a> which evaluates the slip <em>on-the-fly</em>.</p>    <div class="aui-message problem shadowed information-macro">
                     <p class="title">Beware</p>
                             <span class="aui-icon icon-problem">Icon</span>
                 <div class="message-content">
-                            
-<p>You must ensure the expression used for the <code>dynamicRouter</code> such as a bean, will return <code>null</code> to indicate the end. Otherwise the <code>dynamicRouter</code> will keep repeating endlessly.</p>
+                            <p>You must ensure the expression used for the <code>dynamicRouter</code> such as a bean, will return <code>null</code> to indicate the end. Otherwise the <code>dynamicRouter</code> will keep repeating endlessly.</p>
                     </div>
     </div>
-
-
-
-<h3 id="BookPatternAppendix-Options">Options</h3>
-
-<div class="confluenceTableSmall">
-<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>uriDelimiter</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" title="Expression">Expression</a> returned multiple endpoints. </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> If an endpoint uri could not be resolved, should it be ignored. Otherwise Camel will thrown an exception stating the endpoint uri is not 
 valid. </p></td></tr></tbody></table>
-</div>
-
-
-<h3 id="BookPatternAppendix-DynamicRouterinCamel2.5onwards">Dynamic Router in Camel 2.5 onwards</h3>
-
-<p>From Camel 2.5 the <a shape="rect" href="dynamic-router.html">Dynamic Router</a> will set a property (Exchange.SLIP_ENDPOINT) on the <a shape="rect" href="exchange.html">Exchange</a> which contains the current endpoint as it advanced though the slip. This allows you to know how far we have processed in the slip. (It's a slip because the <a shape="rect" href="dynamic-router.html">Dynamic Router</a> implementation is based on top of <a shape="rect" href="routing-slip.html">Routing Slip</a>).</p>
-
-<h4 id="BookPatternAppendix-JavaDSL">Java DSL</h4>
-
-<p>In Java DSL you can use the <code>dynamicRouter</code> as shown below:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<h3 id="BookPatternAppendix-Options">Options</h3><div class="confluenceTableSmall">
+<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>uriDelimiter</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" title="Expression">Expression</a> returned multiple endpoints. </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> If an endpoint uri could not be resolved, should it be ignored. Otherwise Camel will thrown an exception stating the endpoint uri is not 
 valid. </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 routing slip. 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><h3 id="BookPatternAppendix-DynamicRouterinCamel2.5onwards">Dynamic Router in Camel 2.5 onwards</h3><p>From Camel 2.5 the <a shape="rect" href="dynamic-router.html">Dynamic Router</a> will set a property (Exchange.SLIP_ENDPOINT) on the <a shape="rect" href="exchange.html">Exchange</a> which contains the current endpoint as it advanced though the slip. This allows you to know how far we have processed in the slip. (It's a slip because the <a shape="rect" href="dynamic-router.html">Dynamic Router</a> implementation is based on top of <a shape="rect" href="routing-slip.html">Routing Slip</a>).</p><h4 id="BookPatternAppendix-JavaDSL">Java DSL</h4><p>In Java DSL you can use the <code>dynamicRouter</code> as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 from(&quot;direct:start&quot;)
     // use a bean as the dynamic router
     .dynamicRouter(method(DynamicRouterTest.class, &quot;slip&quot;));
 ]]></script>
-</div></div>
-
-<p>Which will leverage a <a shape="rect" href="bean.html">Bean</a> to compute the slip <em>on-the-fly</em>, which could be implemented as follows:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Which will leverage a <a shape="rect" href="bean.html">Bean</a> to compute the slip <em>on-the-fly</em>, which could be implemented as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 /**
  * Use this method to compute dynamic where we should route next.
@@ -1265,10 +1236,7 @@ public String slip(String body) {
     return null;
 }
 ]]></script>
-</div></div>
-
-<p>Mind that this example is only for show and tell. The current implementation is not thread safe. You would have to store the state on the <a shape="rect" href="exchange.html">Exchange</a>, to ensure thread safety, as shown below: </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Mind that this example is only for show and tell. The current implementation is not thread safe. You would have to store the state on the <a shape="rect" href="exchange.html">Exchange</a>, to ensure thread safety, as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 /**
  * Use this method to compute dynamic where we should route next.
@@ -1305,24 +1273,14 @@ public String slip(String body, @Propert
     return null;
 }
 ]]></script>
-</div></div>
-
-<p>You could also store state as message headers, but they are not guaranteed to be preserved during routing, where as properties on the <a shape="rect" href="exchange.html">Exchange</a> are. Although there was a bug in the method call expression, see the warning below.</p>
-
-    <div class="aui-message problem shadowed information-macro">
+</div></div><p>You could also store state as message headers, but they are not guaranteed to be preserved during routing, where as properties on the <a shape="rect" href="exchange.html">Exchange</a> are. Although there was a bug in the method call expression, see the warning below.</p>    <div class="aui-message problem shadowed information-macro">
                     <p class="title">Using beans to store state</p>
                             <span class="aui-icon icon-problem">Icon</span>
                 <div class="message-content">
-                            
-<p>Mind that in Camel 2.9.2 or older, when using a <a shape="rect" href="bean.html">Bean</a> the state is not propagated, so you will have to use a <a shape="rect" href="processor.html">Processor</a> instead. This is fixed in Camel 2.9.3 onwards.</p>
+                            <p>Mind that in Camel 2.9.2 or older, when using a <a shape="rect" href="bean.html">Bean</a> the state is not propagated, so you will have to use a <a shape="rect" href="processor.html">Processor</a> instead. This is fixed in Camel 2.9.3 onwards.</p>
                     </div>
     </div>
-
-
-<h4 id="BookPatternAppendix-SpringXML">Spring XML</h4>
-<p>The same example in Spring XML would be:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<h4 id="BookPatternAppendix-SpringXML">Spring XML</h4><p>The same example in Spring XML would be:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;bean id=&quot;mySlip&quot; class=&quot;org.apache.camel.processor.DynamicRouterTest&quot;/&gt;
 
@@ -1343,14 +1301,8 @@ public String slip(String body, @Propert
 
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<h4 id="BookPatternAppendix-@DynamicRouterannotation">@DynamicRouter annotation</h4>
-
-<p>You can also use the <code>@DynamicRouter</code> annotation, for example the Camel 2.4 example below could be written as follows. The <code>route</code> method would then be invoked repeatedly as the message is processed dynamically. The idea is to return the next endpoint uri where to go. Return <code>null</code> to indicate the end. You can return multiple endpoints if you like, just as the <a shape="rect" href="routing-slip.html">Routing Slip</a>, where each endpoint is separated by a delimiter.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-public class MyDynamicRouter {
+</div></div><h4 id="BookPatternAppendix-@DynamicRouterannotation">@DynamicRouter annotation</h4><p>You can also use the <code>@DynamicRouter</code> annotation, for example the Camel 2.4 example below could be written as follows. The <code>route</code> method would then be invoked repeatedly as the message is processed dynamically. The idea is to return the next endpoint uri where to go. Return <code>null</code> to indicate the end. You can return multiple endpoints if you like, just as the <a shape="rect" href="routing-slip.html">Routing Slip</a>, where each endpoint is separated by a delimiter.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class MyDynamicRouter {
 
     @Consume(uri = &quot;activemq:foo&quot;)
     @DynamicRouter
@@ -1360,14 +1312,8 @@ public class MyDynamicRouter {
     }
 }
 ]]></script>
-</div></div>
-
-<h3 id="BookPatternAppendix-DynamicRouterinCamel2.4orolder">Dynamic Router in Camel 2.4 or older</h3>
-<p>The simplest way to implement this is to use the <a shape="rect" href="recipientlist-annotation.html">RecipientList Annotation</a> on a Bean method to determine where to route the message.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-public class MyDynamicRouter {
+</div></div><h3 id="BookPatternAppendix-DynamicRouterinCamel2.4orolder">Dynamic Router in Camel 2.4 or older</h3><p>The simplest way to implement this is to use the <a shape="rect" href="recipientlist-annotation.html">RecipientList Annotation</a> on a Bean method to determine where to route the message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class MyDynamicRouter {
 
     @Consume(uri = &quot;activemq:foo&quot;)
     @RecipientList
@@ -1377,20 +1323,11 @@ public class MyDynamicRouter {
     }
 }
 ]]></script>
-</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>
-
-
-<h4 id="BookPatternAppendix-UsingThisPattern.16">Using This Pattern</h4>
+</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><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"></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">
-<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>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" title="Expression">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" title="Recipient List">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" title="Aggregator2">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" title="Aggregator2">Aggregat
 e</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" title="Aggregator2">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></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" title="Threading Model">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" title="Expression">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" title="Recipient List">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" title="Recipient List">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 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" title="Processor">Processor</a> t
 o prepare the copy of the <a shape="rect" href="exchange.html" title="Exchange">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></tbody></table>
+<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>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" title="Expression">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" title="Recipient List">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" title="Aggregator2">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" title="Aggregator2">Aggregat
 e</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" title="Aggregator2">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></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" title="Threading Model">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" title="Expression">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" title="Recipient List">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" title="Recipient List">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 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" title="Processor">Processor</a> t
 o prepare the copy of the <a shape="rect" href="exchange.html" title="Exchange">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 <c
 ode>ProducerCache</code> which caches producers for reuse in the routing slip. 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><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">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 RouteBuilder builder = new RouteBuilder() {
@@ -1601,32 +1538,9 @@ from(&quot;direct:c&quot;).to(&quot;mock
 <h3 id="BookPatternAppendix-UsingonPreparetoexecutecustomlogicwhenpreparingmessages">Using onPrepare to execute custom logic when preparing messages</h3><p><strong>Available as of Camel 2.8</strong></p><p>See details at <a shape="rect" href="multicast.html">Multicast</a></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><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"></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">
+<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><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"></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">
 <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 sub-messages, into a single outgoing message from the <a shape="rect" href="splitter.html" title="Splitter">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" title="Aggregator2">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" title="Aggregator2">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>fa
 lse</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" title="Aggregator2">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></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" title="Threading Model">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">AggregationStrate
 gy</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 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 time
 out specified in millis. If the <a shape="rect" href="recipient-list.html" title="Recipient List">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" title="Splitter">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" title="Processor">Processor</a> to prepare the sub-message of the <a shape="rect" href="exchange.html" title="Exchange">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>
-
-<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 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> <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>queue:a</strong> endpoint the split it into pieces using an <a shape="rect" href="expression.html">Expression</a>, then forward each piece to <strong>queue: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">
+</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 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. Th
 is 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>queue:a</strong> endpoint the split it into pieces using an <a shape="rect" href="expression.html">Expression</a>, then forward each piece to <strong>queue: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="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 RouteBuilder builder = new RouteBuilder() {
     public void configure() {
@@ -1638,18 +1552,10 @@ 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">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;activemq:my.queue&quot;).split(xpath(&quot;//foo/bar&quot;)).convertBodyTo(String.class).to(&quot;file://some/directory&quot;)
+</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">
+<script class="theme: Default; brush: java; gutter: false" 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">
+</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">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext errorHandlerRef=&quot;errorHandler&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;route&gt;
@@ -1661,15 +1567,7 @@ from(&quot;activemq:my.queue&quot;).spli
     &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-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">
+</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-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="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;route&gt;
@@ -1681,94 +1579,45 @@ In the sample below we split the body us
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<p>Splitting the body in Spring XML is a bit harder as you need to use the <a shape="rect" href="simple.html">Simple</a> language to dictate this</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;split&gt;
+</div></div><p>Splitting the body in Spring XML is a bit harder as you need to use the <a shape="rect" href="simple.html">Simple</a> language to dictate this</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;split&gt;
    &lt;simple&gt;${body}&lt;/simple&gt;
    &lt;to uri=&quot;mock:result&quot;/&gt;
 &lt;/split&gt;
 ]]></script>
-</div></div>
-
-<h3 id="BookPatternAppendix-WhattheSplitterreturns">What the Splitter returns</h3>
-<p><strong>Camel 2.2 or older:</strong><br clear="none">
-The <a shape="rect" href="splitter.html">Splitter</a> will by default return the <strong>last</strong> splitted message.</p>
-
-<p><strong>Camel 2.3 and newer</strong><br clear="none">
-The <a shape="rect" href="splitter.html">Splitter</a> will by default return the original input message.</p>
-
-<p><strong>For all versions</strong><br clear="none">
-You can override this by suppling your own strategy as an <code>AggregationStrategy</code>. There is a sample on this page (Split aggregate request/reply sample). Notice its the same strategy as the <a shape="rect" href="aggregator.html">Aggregator</a> supports. This <a shape="rect" href="splitter.html">Splitter</a> can be viewed as having a build in light weight <a shape="rect" href="aggregator.html">Aggregator</a>.</p>
-
-<h3 id="BookPatternAppendix-Parallelexecutionofdistinct'parts'">Parallel execution of distinct 'parts'</h3>
-<p>If you want to execute all parts in parallel you can use special notation of <code>split()</code> with two arguments, where the second one is a <strong>boolean</strong> flag if processing should be parallel. e.g.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-XPathBuilder xPathBuilder = new XPathBuilder(&quot;//foo/bar&quot;); 
+</div></div><h3 id="BookPatternAppendix-WhattheSplitterreturns">What the Splitter returns</h3><p><strong>Camel 2.2 or older:</strong><br clear="none"> The <a shape="rect" href="splitter.html">Splitter</a> will by default return the <strong>last</strong> splitted message.</p><p><strong>Camel 2.3 and newer</strong><br clear="none"> The <a shape="rect" href="splitter.html">Splitter</a> will by default return the original input message.</p><p><strong>For all versions</strong><br clear="none"> You can override this by suppling your own strategy as an <code>AggregationStrategy</code>. There is a sample on this page (Split aggregate request/reply sample). Notice its the same strategy as the <a shape="rect" href="aggregator.html">Aggregator</a> supports. This <a shape="rect" href="splitter.html">Splitter</a> can be viewed as having a build in light weight <a shape="rect" href="aggregator.html">Aggregator</a>.</p><h3 id="BookPatternAppendix-Parallelexecutionofdistinct'parts'">Parallel execut
 ion of distinct 'parts'</h3><p>If you want to execute all parts in parallel you can use special notation of <code>split()</code> with two arguments, where the second one is a <strong>boolean</strong> flag if processing should be parallel. e.g.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[XPathBuilder xPathBuilder = new XPathBuilder(&quot;//foo/bar&quot;); 
 from(&quot;activemq:my.queue&quot;).split(xPathBuilder, true).to(&quot;activemq:my.parts&quot;);
 ]]></script>
-</div></div>
-
-<p>The boolean option has been refactored into a builder method <code>parallelProcessing</code> so its easier to understand what the route does when we use a method instead of true|false.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-XPathBuilder xPathBuilder = new XPathBuilder(&quot;//foo/bar&quot;); 
+</div></div><p>The boolean option has been refactored into a builder method <code>parallelProcessing</code> so its easier to understand what the route does when we use a method instead of true|false.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[XPathBuilder xPathBuilder = new XPathBuilder(&quot;//foo/bar&quot;); 
 from(&quot;activemq:my.queue&quot;).split(xPathBuilder).parallelProcessing().to(&quot;activemq:my.parts&quot;);
 ]]></script>
-</div></div>
-
-<h3 id="BookPatternAppendix-Streambased">Stream based</h3>
-    <div class="aui-message hint shadowed information-macro">
+</div></div><h3 id="BookPatternAppendix-Streambased">Stream based</h3>    <div class="aui-message hint shadowed information-macro">
                     <p class="title">Splitting big XML payloads</p>
                             <span class="aui-icon icon-hint">Icon</span>
                 <div class="message-content">
-                            
-<p>The XPath engine in Java and <a shape="rect" href="xquery.html">saxon</a> will load the entire XML content into memory. And thus they are not well suited for very big XML payloads.<br clear="none">
-Instead you can use a custom <a shape="rect" href="expression.html">Expression</a> which will iterate the XML payload in a streamed fashion. From Camel 2.9 onwards you can use the Tokenizer language<br clear="none">
-which supports this when you supply the start and end tokens.</p>
+                            <p>The XPath engine in Java and <a shape="rect" href="xquery.html">saxon</a> will load the entire XML content into memory. And thus they are not well suited for very big XML payloads.<br clear="none"> Instead you can use a custom <a shape="rect" href="expression.html">Expression</a> which will iterate the XML payload in a streamed fashion. From Camel 2.9 onwards you can use the Tokenizer language<br clear="none"> which supports this when you supply the start and end tokens.</p>
                     </div>
     </div>
-
-
-<p>You can split streams by enabling the streaming mode using the <code>streaming</code> builder method.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-    from(&quot;direct:streaming&quot;).split(body().tokenize(&quot;,&quot;)).streaming().to(&quot;activemq:my.parts&quot;);
+<p>You can split streams by enabling the streaming mode using the <code>streaming</code> builder method.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[    from(&quot;direct:streaming&quot;).split(body().tokenize(&quot;,&quot;)).streaming().to(&quot;activemq:my.parts&quot;);
 ]]></script>
-</div></div>
-
-<p>You can also supply your custom splitter to use with streaming like this:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-import static org.apache.camel.builder.ExpressionBuilder.beanExpression;
+</div></div><p>You can also supply your custom splitter to use with streaming like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[import static org.apache.camel.builder.ExpressionBuilder.beanExpression;
 from(&quot;direct:streaming&quot;)
      .split(beanExpression(new MyCustomIteratorFactory(),  &quot;iterator&quot;))
      .streaming().to(&quot;activemq:my.parts&quot;)
 ]]></script>
-</div></div>
-
-<h4 id="BookPatternAppendix-StreamingbigXMLpayloadsusingTokenizerlanguage">Streaming big XML payloads using Tokenizer language</h4>
-<p><strong>Available as of Camel 2.9</strong><br clear="none">
-If you have a big XML payload, from a file source, and want to split it in streaming mode, then you can use the Tokenizer language with start/end tokens to do this with low memory footprint.</p>
-
-    <div class="aui-message success shadowed information-macro">
+</div></div><h4 id="BookPatternAppendix-StreamingbigXMLpayloadsusingTokenizerlanguage">Streaming big XML payloads using Tokenizer language</h4><p><strong>Available as of Camel 2.9</strong><br clear="none"> If you have a big XML payload, from a file source, and want to split it in streaming mode, then you can use the Tokenizer language with start/end tokens to do this with low memory footprint.</p>    <div class="aui-message success shadowed information-macro">
                     <p class="title">StAX component</p>
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>The Camel <a shape="rect" href="stax.html">StAX</a> component can also be used to split big XML files in a streaming mode. See more details at <a shape="rect" href="stax.html">StAX</a>.</p>
+                            <p>The Camel <a shape="rect" href="stax.html">StAX</a> component can also be used to split big XML files in a streaming mode. See more details at <a shape="rect" href="stax.html">StAX</a>.</p>
                     </div>
     </div>
-
-
-<p>For example you may have a XML payload structured as follows</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;orders&gt;
+<p>For example you may have a XML payload structured as follows</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;orders&gt;
   &lt;order&gt;
     &lt;!-- order stuff here --&gt;
   &lt;/order&gt;
@@ -1781,21 +1630,13 @@ If you have a big XML payload, from a fi
   &lt;/order&gt;
 &lt;/orders&gt;
 ]]></script>
-</div></div>
-
-<p>Now to split this big file using <a shape="rect" href="xpath.html">XPath</a> would cause the entire content to be loaded into memory. So instead we can use the Tokenizer language to do this as follows:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-  from(&quot;file:inbox&quot;)
+</div></div><p>Now to split this big file using <a shape="rect" href="xpath.html">XPath</a> would cause the entire content to be loaded into memory. So instead we can use the Tokenizer language to do this as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  from(&quot;file:inbox&quot;)
     .split().tokenizeXML(&quot;order&quot;).streaming()
        .to(&quot;activemq:queue:order&quot;);
 ]]></script>
-</div></div>
-
-<p>In XML DSL the route would be as follows:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;route&gt;
+</div></div><p>In XML DSL the route would be as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
   &lt;from uri=&quot;file:inbox&quot;/&gt;
   &lt;split streaming=&quot;true&quot;&gt;
     &lt;tokenize token=&quot;order&quot; xml=&quot;true&quot;/&gt;
@@ -1803,21 +1644,13 @@ If you have a big XML payload, from a fi
   &lt;/split&gt;
 &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<p>Notice the <code>tokenizeXML</code> method which will split the file using the tag name of the child node, which mean it will grab the content between the <code>&lt;order&gt;</code> and <code>&lt;/order&gt;</code> tags (incl. the tokens). So for example a splitted message would be as follows:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-  &lt;order&gt;
+</div></div><p>Notice the <code>tokenizeXML</code> method which will split the file using the tag name of the child node, which mean it will grab the content between the <code>&lt;order&gt;</code> and <code>&lt;/order&gt;</code> tags (incl. the tokens). So for example a splitted message would be as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[  &lt;order&gt;
     &lt;!-- order stuff here --&gt;
   &lt;/order&gt;
 ]]></script>
-</div></div>
-
-<p>If you want to inherit namespaces from a root/parent tag, then you can do this as well by providing the name of the root/parent tag:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;route&gt;
+</div></div><p>If you want to inherit namespaces from a root/parent tag, then you can do this as well by providing the name of the root/parent tag:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
   &lt;from uri=&quot;file:inbox&quot;/&gt;
   &lt;split streaming=&quot;true&quot;&gt;
     &lt;tokenize token=&quot;order&quot; inheritNamespaceTagName=&quot;orders&quot; xml=&quot;true&quot;/&gt;
@@ -1825,34 +1658,18 @@ If you have a big XML payload, from a fi
   &lt;/split&gt;
 &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<p>And in Java DSL its as follows:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-  from(&quot;file:inbox&quot;)
+</div></div><p>And in Java DSL its as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  from(&quot;file:inbox&quot;)
     .split().tokenizeXML(&quot;order&quot;, &quot;orders&quot;).streaming()
        .to(&quot;activemq:queue:order&quot;);
 ]]></script>
-</div></div>
-
-
-<h4 id="BookPatternAppendix-SplittingfilesbygroupingNlinestogether">Splitting files by grouping N lines together</h4>
-<p><strong>Available as of Camel 2.10</strong></p>
-
-<p>The <a shape="rect" href="tokenizer.html">Tokenizer</a> language has a new option <code>group</code> that allows you to group N parts together, for example to split big files into chunks of 1000 lines.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-  from(&quot;file:inbox&quot;)
+</div></div><p><span style="line-height: 1.4285715;">Available as of Camel 2.13.1, you can set the above inheritNamsepaceTagName property to "*" to&#160;include the preceding context in each token (i.e., generating each token enclosed in its ancestor elements).</span></p><h4 id="BookPatternAppendix-SplittingfilesbygroupingNlinestogether">Splitting files by grouping N lines together</h4><p><strong>Available as of Camel 2.10</strong></p><p>The <a shape="rect" href="tokenizer.html">Tokenizer</a> language has a new option <code>group</code> that allows you to group N parts together, for example to split big files into chunks of 1000 lines.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  from(&quot;file:inbox&quot;)
     .split().tokenize(&quot;\n&quot;, 1000).streaming()
        .to(&quot;activemq:queue:order&quot;);
 ]]></script>
-</div></div>
-
-<p>And in XML DSL</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;route&gt;
+</div></div><p>And in XML DSL</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
   &lt;from uri=&quot;file:inbox&quot;/&gt;
   &lt;split streaming=&quot;true&quot;&gt;
     &lt;tokenize token=&quot;\n&quot; group=&quot;1000&quot;/&gt;
@@ -1860,24 +1677,8 @@ If you have a big XML payload, from a fi
   &lt;/split&gt;
 &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<p>The <code>group</code> option is a number that must be a positive number that dictates how many groups to combine together. Each part will be combined using the token.<br clear="none">
-So in the example above the message being sent to the activemq order queue, will contain 1000 lines, and each line separated by the token (which is a new line token).<br clear="none">
-The output when using the <code>group</code> option is always a <code>java.lang.String</code> type. </p>
-
-
-
-<h4 id="BookPatternAppendix-Specifyingacustomaggregationstrategy">Specifying a custom aggregation strategy </h4>
-
-<p>This is specified similar to the <a shape="rect" href="aggregator.html">Aggregator</a>.</p>
-
-<h4 id="BookPatternAppendix-SpecifyingacustomThreadPoolExecutor">Specifying a custom ThreadPoolExecutor</h4>
-<p>You can customize the underlying ThreadPoolExecutor used in the parallel splitter. In the Java DSL try something like this:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-XPathBuilder xPathBuilder = new XPathBuilder(&quot;//foo/bar&quot;); 
+</div></div><p>The <code>group</code> option is a number that must be a positive number that dictates how many groups to combine together. Each part will be combined using the token.<br clear="none"> So in the example above the message being sent to the activemq order queue, will contain 1000 lines, and each line separated by the token (which is a new line token).<br clear="none"> The output when using the <code>group</code> option is always a <code>java.lang.String</code> type.</p><h4 id="BookPatternAppendix-Specifyingacustomaggregationstrategy">Specifying a custom aggregation strategy</h4><p>This is specified similar to the <a shape="rect" href="aggregator.html">Aggregator</a>.</p><h4 id="BookPatternAppendix-SpecifyingacustomThreadPoolExecutor">Specifying a custom ThreadPoolExecutor</h4><p>You can customize the underlying ThreadPoolExecutor used in the parallel splitter. In the Java DSL try something like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="
 codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[XPathBuilder xPathBuilder = new XPathBuilder(&quot;//foo/bar&quot;); 
 
 ExecutorService pool = ...
 
@@ -1885,25 +1686,14 @@ from(&quot;activemq:my.queue&quot;)
     .split(xPathBuilder).parallelProcessing().executorService(pool)
         .to(&quot;activemq:my.parts&quot;);
 ]]></script>
-</div></div>
-
-<h4 id="BookPatternAppendix-UsingaPojotodothesplitting">Using a Pojo to do the splitting</h4>
-<p>As the <a shape="rect" href="splitter.html">Splitter</a> can use any <a shape="rect" href="expression.html">Expression</a> to do the actual splitting we leverage this fact and use a <strong>method</strong> expression to invoke a <a shape="rect" href="bean.html">Bean</a> to get the splitted parts.<br clear="none">
-The <a shape="rect" href="bean.html">Bean</a> should return a value that is iterable such as: <code>java.util.Collection, java.util.Iterator</code> or an array. <br clear="none">
-So the returned value, will then be used by Camel at runtime, to split the message. </p>
-
-    <div class="aui-message success shadowed information-macro">
+</div></div><h4 id="BookPatternAppendix-UsingaPojotodothesplitting">Using a Pojo to do the splitting</h4><p>As the <a shape="rect" href="splitter.html">Splitter</a> can use any <a shape="rect" href="expression.html">Expression</a> to do the actual splitting we leverage this fact and use a <strong>method</strong> expression to invoke a <a shape="rect" href="bean.html">Bean</a> to get the splitted parts.<br clear="none"> The <a shape="rect" href="bean.html">Bean</a> should return a value that is iterable such as: <code>java.util.Collection, java.util.Iterator</code> or an array. <br clear="none"> So the returned value, will then be used by Camel at runtime, to split the message.</p>    <div class="aui-message success shadowed information-macro">
                     <p class="title">Streaming mode and using pojo</p>
                             <span class="aui-icon icon-success">Icon</span>
                 <div class="message-content">
-                            
-<p>When you have enabled the streaming mode, then you should return a <code>Iterator</code> to ensure streamish fashion. For example if the message is a big file, then by using an iterator, that returns a piece of the file in chunks, in the <code>next</code> method of the <code>Iterator</code> ensures low memory footprint. This avoids the need for reading the entire content into memory. For an example see the source code for the <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java">TokenizePair</a> implementation.</p>
+                            <p>When you have enabled the streaming mode, then you should return a <code>Iterator</code> to ensure streamish fashion. For example if the message is a big file, then by using an iterator, that returns a piece of the file in chunks, in the <code>next</code> method of the <code>Iterator</code> ensures low memory footprint. This avoids the need for reading the entire content into memory. For an example see the source code for the <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java">TokenizePair</a> implementation.</p>
                     </div>
     </div>
-
-
-<p>In the route we define the <a shape="rect" href="expression.html">Expression</a> as a method call to invoke our <a shape="rect" href="bean.html">Bean</a> that we have registered with the id mySplitterBean in the <a shape="rect" href="registry.html">Registry</a>.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<p>In the route we define the <a shape="rect" href="expression.html">Expression</a> as a method call to invoke our <a shape="rect" href="bean.html">Bean</a> that we have registered with the id mySplitterBean in the <a shape="rect" href="registry.html">Registry</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 from(&quot;direct:body&quot;)
         // here we use a POJO bean mySplitterBean to do the split of the payload
@@ -1915,10 +1705,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><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">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 public class MySplitterBean {
 
@@ -1968,13 +1755,7 @@ public class MySplitterBean {
     }
 }
 ]]></script>
-</div></div>
-
-<h4 id="BookPatternAppendix-Splitaggregaterequest/replysample">Split aggregate request/reply sample</h4>
-<p>This sample shows how you can split an <a shape="rect" href="exchange.html">Exchange</a>, process each splitted message, aggregate and return a combined response to the original caller using request/reply.</p>
-
-<p>The route below illustrates this and how the split supports a <strong>aggregationStrategy</strong> to hold the in progress processed messages:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h4 id="BookPatternAppendix-Splitaggregaterequest/replysample">Split aggregate request/reply sample</h4><p>This sample shows how you can split an <a shape="rect" href="exchange.html">Exchange</a>, process each splitted message, aggregate and return a combined response to the original caller using request/reply.</p><p>The route below illustrates this and how the split supports a <strong>aggregationStrategy</strong> to hold the in progress processed messages:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 // this routes starts from the direct:start endpoint
 // the body is then splitted based on @ separator
@@ -1993,10 +1774,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><p>And the OrderService bean is as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 public static class MyOrderService {
 
@@ -2020,10 +1798,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><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">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 /**
  * This is our own order aggregation strategy where we can control
@@ -2058,13 +1833,8 @@ 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">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-HandleOrder: A
+</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">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[HandleOrder: A
 HandleOrder: B
 Aggregate old orders: (id=1,item=A)
 Aggregate new order: (id=2,item=B)
@@ -2074,29 +1844,14 @@ Aggregate new order: (id=3,item=C)
 BuildCombinedResponse: (id=1,item=A);(id=2,item=B);(id=3,item=C)
 Response to caller: Response[(id=1,item=A);(id=2,item=B);(id=3,item=C)]
 ]]></script>
-</div></div>
-
-<h3 id="BookPatternAppendix-Stopprocessingincaseofexception">Stop processing in case of exception</h3>
-<p><strong>Available as of Camel 2.1</strong></p>
-
-<p>The <a shape="rect" href="splitter.html">Splitter</a> will by default continue to process the entire <a shape="rect" href="exchange.html">Exchange</a> even in case of one of the splitted message will thrown an exception during routing.<br clear="none">
-For example if you have an <a shape="rect" href="exchange.html">Exchange</a> with 1000 rows that you split and route each sub message. During processing of these sub messages an exception is thrown at the 17th. What Camel does by default is to process the remainder 983 messages. You have the chance to remedy or handle this in the <code>AggregationStrategy</code>.</p>
-
-<p>But sometimes you just want Camel to stop and let the exception be propagated back, and let the Camel error handler handle it. You can do this in Camel 2.1 by specifying that it should stop in case of an exception occurred. This is done by the <code>stopOnException</code> option as shown below:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-    from(&quot;direct:start&quot;)
+</div></div><h3 id="BookPatternAppendix-Stopprocessingincaseofexception">Stop processing in case of exception</h3><p><strong>Available as of Camel 2.1</strong></p><p>The <a shape="rect" href="splitter.html">Splitter</a> will by default continue to process the entire <a shape="rect" href="exchange.html">Exchange</a> even in case of one of the splitted message will thrown an exception during routing.<br clear="none"> For example if you have an <a shape="rect" href="exchange.html">Exchange</a> with 1000 rows that you split and route each sub message. During processing of these sub messages an exception is thrown at the 17th. What Camel does by default is to process the remainder 983 messages. You have the chance to remedy or handle this in the <code>AggregationStrategy</code>.</p><p>But sometimes you just want Camel to stop and let the exception be propagated back, and let the Camel error handler handle it. You can do this in Camel 2.1 by specifying that it should stop in case of an ex
 ception occurred. This is done by the <code>stopOnException</code> option as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[    from(&quot;direct:start&quot;)
         .split(body().tokenize(&quot;,&quot;)).stopOnException()
             .process(new MyProcessor())
             .to(&quot;mock:split&quot;);
 ]]></script>
-</div></div>
-
-<p>And using XML DSL you specify it as follows:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-        &lt;route&gt;
+</div></div><p>And using XML DSL you specify it as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[        &lt;route&gt;
             &lt;from uri=&quot;direct:start&quot;/&gt;
             &lt;split stopOnException=&quot;true&quot;&gt;
                 &lt;tokenize token=&quot;,&quot;/&gt;
@@ -2105,23 +1860,7 @@ For example if you have an <a shape="rec
             &lt;/split&gt;
         &lt;/route&gt;
 ]]></script>
-</div></div>
-
-<h3 id="BookPatternAppendix-UsingonPreparetoexecutecustomlogicwhenpreparingmessages.1">Using onPrepare to execute custom logic when preparing messages</h3>
-<p><strong>Available as of Camel 2.8</strong></p>
-
-<p>See details at <a shape="rect" href="multicast.html">Multicast</a></p>
-
-
-<h3 id="BookPatternAppendix-Sharingunitofwork">Sharing unit of work</h3>
-<p><strong>Available as of Camel 2.8</strong></p>
-
-<p>The <a shape="rect" href="splitter.html">Splitter</a> will by default not share unit of work between the parent exchange and each splitted exchange. This means each sub exchange has its own individual unit of work.</p>
-
-<p>For example you may have an use case, where you want to split a big message. And you want to regard that process as an atomic isolated operation that either is a success or failure. In case of a failure you want that big message to be moved into a <a shape="rect" href="dead-letter-channel.html">dead letter queue</a>. To support this use case, you would have to share the unit of work on the <a shape="rect" href="splitter.html">Splitter</a>.</p>
-
-<p>Here is an example in Java DSL</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">

[... 677 lines stripped ...]


Mime
View raw message