You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2013/08/19 17:21:20 UTC

svn commit: r875334 [2/2] - in /websites/production/camel/content: aggregator2.html book-in-one-page.html book-pattern-appendix.html cache/main.pageCache

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 Mon Aug 19 15:21:20 2013
@@ -2347,7 +2347,7 @@ from("direct:line")
 <h3><a shape="rect" name="BookPatternAppendix-Aggregatoroptions"></a>Aggregator options</h3>
 <p>The aggregator supports the following options:</p>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> correlationExpression </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Mandatory <a shape="rect" href="expression.html" title="Expression">Expression</a> which evaluates the correlation key to use for aggregation. The <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> which has the same correlation key is aggregated together. If the correlation key could not be evaluated an Exception is thrown. You can disable this by using the <tt>ignoreBadCorrelationKeys</tt> option. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> aggregationStrategy </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td
 ><td colspan="1" rowspan="1" class="confluenceTd"> Mandatory <tt>AggregationStrategy</tt> which is used to <em>merge</em> the incoming <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> with the existing already merged exchanges. At first call the <tt>oldExchange</tt> parameter is <tt>null</tt>. On subsequent invocations the <tt>oldExchange</tt> contains the merged exchanges and <tt>newExchange</tt> is of course the new incoming Exchange. From <b>Camel 2.9.2</b> onwards the strategy can also be a <tt>TimeoutAwareAggregationStrategy</tt> implementation, supporting the timeout callback, see further below for more details. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> strategyRef </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> A reference to lookup the <tt>AggregationStrategy</tt> in the <a shape="rect" href="registry.html" title="Registry">Registry</a>. </td></tr><tr><td colspan="1" ro
 wspan="1" class="confluenceTd"> completionSize </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Number of messages aggregated before the aggregation is complete. This option can be set as either a fixed value or using an <a shape="rect" href="expression.html" title="Expression">Expression</a> which allows you to evaluate a size dynamically - will use <tt>Integer</tt> as result. If both are set Camel will fallback to use the fixed value if the <a shape="rect" href="expression.html" title="Expression">Expression</a> result was <tt>null</tt> or <tt>0</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> completionTimeout </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Time in millis that an aggregated exchange should be inactive before its complete. This option can be set as either a fixed value or using an <a shape="rect" href="expression
 .html" title="Expression">Expression</a> which allows you to evaluate a timeout dynamically - will use <tt>Long</tt> as result. If both are set Camel will fallback to use the fixed value if the <a shape="rect" href="expression.html" title="Expression">Expression</a> result was <tt>null</tt> or <tt>0</tt>. You cannot use this option together with completionInterval, only one of the two can be used. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> completionInterval </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> A repeating period in millis by which the aggregator will complete all current aggregated exchanges. Camel has a background task which is triggered every period. You cannot use this option together with completionTimeout, only one of them can be used. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> completionPredicate </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</
 td><td colspan="1" rowspan="1" class="confluenceTd"> A <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> to indicate when an aggregated exchange is complete. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> completionFromBatchConsumer </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> This option is if the exchanges are coming from a <a shape="rect" href="batch-consumer.html" title="Batch Consumer">Batch Consumer</a>. Then when enabled the <a shape="rect" href="aggregator2.html" title="Aggregator2">Aggregator2</a> will use the batch size determined by the <a shape="rect" href="batch-consumer.html" title="Batch Consumer">Batch Consumer</a> in the message header <tt>CamelBatchSize</tt>. See more details at <a shape="rect" href="batch-consumer.html" title="Batch Consumer">Batch Consumer</a>. This can be used to aggregate all files consumed from a <a shape="rect" href="file2.html
 " title="File2">File</a> endpoint in that given poll. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> forceCompletionOnStop </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9</b> Indicates to complete all current aggregated exchanges when the context is stopped </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> eagerCheckCompletion </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not to eager check for completion when a new incoming <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> has been received. This option influences the behavior of the <tt>completionPredicate</tt> option as the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> being passed in changes accordingly. When <tt>false</tt> the <a shape="rect" href="exchange.html" title="Exchange">Exc
 hange</a> passed in the <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> is the <em>aggregated</em> Exchange which means any information you may store on the aggregated Exchange from the <tt>AggregationStrategy</tt> is available for the <a shape="rect" href="predicate.html" title="Predicate">Predicate</a>. When <tt>true</tt> the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> passed in the <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> is the <em>incoming</em> <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>, which means you can access data from the incoming Exchange. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> groupExchanges </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If enabled then Camel will group all aggregated Exchanges into a single combined <tt>org.apache.camel.impl.GroupedExchange</tt> holder cl
 ass that holds all the aggregated Exchanges. And as a result only one Exchange is being sent out from the aggregator. Can be used to combine many incoming Exchanges into a single output Exchange without coding a custom <tt>AggregationStrategy</tt> yourself. <b>Important:</b> This option does <b>not</b> support persistant repository with the aggregator. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> ignoreInvalidCorrelationKeys </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not to ignore correlation keys which could not be evaluated to a value. By default Camel will throw an Exception, but you can enable this option and ignore the situation instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> closeCorrelationKeyOnCompletion </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not too <em>
 late</em> Exchanges should be accepted or not. You can enable this to indicate that if a correlation key has already been completed, then any new exchanges with the same correlation key be denied. Camel will then throw a <tt>closedCorrelationKeyException</tt> exception. When using this option you pass in a <tt>integer</tt> which is a number for a LRUCache which keeps that last X number of closed correlation keys. You can pass in 0 or a negative value to indicate a unbounded cache. By passing in a number you are ensured that cache won't grow too big if you use a log of different correlation keys. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> discardOnCompletionTimeout </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.5:</b> Whether or not exchanges which complete due to a timeout should be discarded. If enabled then when a timeout occurs the aggregated message will <b>not</b> be se
 nt out but dropped (discarded). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> aggregationRepository </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Allows you to plugin you own implementation of <tt>org.apache.camel.spi.AggregationRepository</tt> which keeps track of the current inflight aggregated exchanges. Camel uses by default a memory based implementation. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> aggregationRepositoryRef </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to lookup a <tt>aggregationRepository</tt> in the <a shape="rect" href="registry.html" title="Registry">Registry</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> parallelProcessing </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> When agg
 regated are completed they are being send out of the aggregator. This option indicates whether or not Camel should use a thread pool with multiple threads for concurrency. If no custom thread pool has been specified then Camel creates a default pool with 10 concurrent threads. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> executorService </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> If using <tt>parallelProcessing</tt> you can specify a custom thread pool to be used. In fact also if you are not using <tt>parallelProcessing</tt> this custom thread pool is used to send out aggregated exchanges as well. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> executorServiceRef </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to lookup a <tt>executorService</tt> in the <a shape="rect" href="registry.html" title="Regist
 ry">Registry</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> timeoutCheckerExecutorService </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> If using either of the <tt>completionTimeout</tt>, <tt>completionTimeoutExpression</tt>, or <tt>completionInterval</tt> options a background thread is created to check for the completion for every aggregator. Set this option to provide a custom thread pool to be used rather than creating a new thread for every aggregator. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> timeoutCheckerExecutorServiceRef </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> Reference to lookup a <tt>timeoutCheckerExecutorService</tt> in the <a shape="rect" href="registry.html" title="Registry">Registry</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
 optimisticLocking </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Turns on using optimistic locking, which requires the <tt>aggregationRepository</tt> being used, is supporting this by implementing the <tt>org.apache.camel.spi.OptimisticLockingAggregationRepository</tt> interface. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> optimisticLockRetryPolicy </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> Allows to configure retry settings when using optimistic locking. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Option </th><th colspan="1" rowspan="1" class="confluenceTh"> Default </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> correlationExpression </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Mandatory <a shape="rect" href="expression.html" title="Expression">Expression</a> which evaluates the correlation key to use for aggregation. The <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> which has the same correlation key is aggregated together. If the correlation key could not be evaluated an Exception is thrown. You can disable this by using the <tt>ignoreBadCorrelationKeys</tt> option. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> aggregationStrategy </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td
 ><td colspan="1" rowspan="1" class="confluenceTd"> Mandatory <tt>AggregationStrategy</tt> which is used to <em>merge</em> the incoming <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> with the existing already merged exchanges. At first call the <tt>oldExchange</tt> parameter is <tt>null</tt>. On subsequent invocations the <tt>oldExchange</tt> contains the merged exchanges and <tt>newExchange</tt> is of course the new incoming Exchange. From <b>Camel 2.9.2</b> onwards the strategy can also be a <tt>TimeoutAwareAggregationStrategy</tt> implementation, supporting the timeout callback, see further below for more details. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> strategyRef </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> A reference to lookup the <tt>AggregationStrategy</tt> in the <a shape="rect" href="registry.html" title="Registry">Registry</a>. From <b>Camel 2.12</b> onwards y
 ou can also use a POJO as the <tt>AggregationStrategy</tt>, see further below for details. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> strategyMethodName </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> This option can be used to explicit declare the method name to use, when using POJOs as the <tt>AggregationStrategy</tt>. See further below for more details. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> completionSize </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Number of messages aggregated before the aggregation is complete. This option can be set as either a fixed value or using an <a shape="rect" href="expression.html" title="Expression">Expression</a> which allows you to evaluate a size dynamically - will use <tt>Integer</tt> as result. If both are set Camel will fallback to use the fixed
  value if the <a shape="rect" href="expression.html" title="Expression">Expression</a> result was <tt>null</tt> or <tt>0</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> completionTimeout </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Time in millis that an aggregated exchange should be inactive before its complete. This option can be set as either a fixed value or using an <a shape="rect" href="expression.html" title="Expression">Expression</a> which allows you to evaluate a timeout dynamically - will use <tt>Long</tt> as result. If both are set Camel will fallback to use the fixed value if the <a shape="rect" href="expression.html" title="Expression">Expression</a> result was <tt>null</tt> or <tt>0</tt>. You cannot use this option together with completionInterval, only one of the two can be used. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> completionInterval </td><td colspa
 n="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> A repeating period in millis by which the aggregator will complete all current aggregated exchanges. Camel has a background task which is triggered every period. You cannot use this option together with completionTimeout, only one of them can be used. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> completionPredicate </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> A <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> to indicate when an aggregated exchange is complete. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> completionFromBatchConsumer </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> This option is if the exchanges are coming from a <a shape="rect" href="batch-consumer.html" title="Batc
 h Consumer">Batch Consumer</a>. Then when enabled the <a shape="rect" href="aggregator2.html" title="Aggregator2">Aggregator2</a> will use the batch size determined by the <a shape="rect" href="batch-consumer.html" title="Batch Consumer">Batch Consumer</a> in the message header <tt>CamelBatchSize</tt>. See more details at <a shape="rect" href="batch-consumer.html" title="Batch Consumer">Batch Consumer</a>. This can be used to aggregate all files consumed from a <a shape="rect" href="file2.html" title="File2">File</a> endpoint in that given poll. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> forceCompletionOnStop </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9</b> Indicates to complete all current aggregated exchanges when the context is stopped </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> eagerCheckCompletion </td><td colspan="1" rowspan="1" class="confluenc
 eTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not to eager check for completion when a new incoming <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> has been received. This option influences the behavior of the <tt>completionPredicate</tt> option as the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> being passed in changes accordingly. When <tt>false</tt> the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> passed in the <a shape="rect" href="predicate.html" title="Predicate">Predicate</a> is the <em>aggregated</em> Exchange which means any information you may store on the aggregated Exchange from the <tt>AggregationStrategy</tt> is available for the <a shape="rect" href="predicate.html" title="Predicate">Predicate</a>. When <tt>true</tt> the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a> passed in the <a shape="rect" href="predicate.html" title="Predicate">Predicate<
 /a> is the <em>incoming</em> <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>, which means you can access data from the incoming Exchange. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> groupExchanges </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If enabled then Camel will group all aggregated Exchanges into a single combined <tt>org.apache.camel.impl.GroupedExchange</tt> holder class that holds all the aggregated Exchanges. And as a result only one Exchange is being sent out from the aggregator. Can be used to combine many incoming Exchanges into a single output Exchange without coding a custom <tt>AggregationStrategy</tt> yourself. <b>Important:</b> This option does <b>not</b> support persistant repository with the aggregator. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> ignoreInvalidCorrelationKeys </td><td colspan="1" rowspan="1" class="confluenceT
 d"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not to ignore correlation keys which could not be evaluated to a value. By default Camel will throw an Exception, but you can enable this option and ignore the situation instead. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> closeCorrelationKeyOnCompletion </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not too <em>late</em> Exchanges should be accepted or not. You can enable this to indicate that if a correlation key has already been completed, then any new exchanges with the same correlation key be denied. Camel will then throw a <tt>closedCorrelationKeyException</tt> exception. When using this option you pass in a <tt>integer</tt> which is a number for a LRUCache which keeps that last X number of closed correlation keys. You can pass in 0 or a negative value to indicate a unbounded cache. By passing in
  a number you are ensured that cache won't grow too big if you use a log of different correlation keys. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> discardOnCompletionTimeout </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.5:</b> Whether or not exchanges which complete due to a timeout should be discarded. If enabled then when a timeout occurs the aggregated message will <b>not</b> be sent out but dropped (discarded). </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> aggregationRepository </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Allows you to plugin you own implementation of <tt>org.apache.camel.spi.AggregationRepository</tt> which keeps track of the current inflight aggregated exchanges. Camel uses by default a memory based implementation. </td></tr><tr><td colspan="1" rowspan="1" class="c
 onfluenceTd"> aggregationRepositoryRef </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to lookup a <tt>aggregationRepository</tt> in the <a shape="rect" href="registry.html" title="Registry">Registry</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> parallelProcessing </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> When aggregated are completed they are being send out of the aggregator. This option indicates whether or not Camel should use a thread pool with multiple threads for concurrency. If no custom thread pool has been specified then Camel creates a default pool with 10 concurrent threads. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> executorService </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> If using <tt>parallelProce
 ssing</tt> you can specify a custom thread pool to be used. In fact also if you are not using <tt>parallelProcessing</tt> this custom thread pool is used to send out aggregated exchanges as well. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> executorServiceRef </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> Reference to lookup a <tt>executorService</tt> in the <a shape="rect" href="registry.html" title="Registry">Registry</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> timeoutCheckerExecutorService </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> If using either of the <tt>completionTimeout</tt>, <tt>completionTimeoutExpression</tt>, or <tt>completionInterval</tt> options a background thread is created to check for the completion for every aggregator. Set this option to provide a custom thread poo
 l to be used rather than creating a new thread for every aggregator. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> timeoutCheckerExecutorServiceRef </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> Reference to lookup a <tt>timeoutCheckerExecutorService</tt> in the <a shape="rect" href="registry.html" title="Registry">Registry</a> </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> optimisticLocking </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Turns on using optimistic locking, which requires the <tt>aggregationRepository</tt> being used, is supporting this by implementing the <tt>org.apache.camel.spi.OptimisticLockingAggregationRepository</tt> interface. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> optimisticLockRetryPolicy </td><td colspan="1" rowspan="1
 " class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> Allows to configure retry settings when using optimistic locking. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -2685,6 +2685,49 @@ public final class MyListOfNumbersStrate
 </div></div>
 
 
+<h3><a shape="rect" name="BookPatternAppendix-UsingPOJOsasAggregationStrategy"></a>Using POJOs as AggregationStrategy</h3>
+<p><b>Available as of Camel 2.12</b></p>
+
+<p>To use the <tt>AggregationStrategy</tt> you had to implement the <tt>org.apache.camel.processor.aggregate.AggregationStrategy</tt> interface, which means your logic would be tied to the Camel API. From <b>Camel 2.12</b> onwards you can use a POJO for the logic and let Camel adapt to your POJO. To use a POJO a convention must be followed:</p>
+
+<ul class="alternate" type="square"><li>there must be a public method to use</li><li>the method must not be void</li><li>the method can be static or non-static</li><li>the method must have 2 or more parameters</li><li>the parameters is paired so the first 50% is applied to the <tt>oldExchnage</tt> and the reminder 50% is for the <tt>newExchange</tt></li><li>.. meaning that there must be an equal number of parameters, eg 2, 4, 6 etc.</li></ul>
+
+
+<p>The paired methods is expected to be ordered as follows:</p>
+<ul class="alternate" type="square"><li>the first parameter is the message body</li><li>the 2nd parameter is a Map of the headers</li><li>the 3rd parameter is a Map of the Exchange properties</li></ul>
+
+
+<p>This convention is best explained with some examples.</p>
+
+<p>In the method below, we have only 2 parameters, so the 1st parameter is the body of the <tt>oldExchange</tt>, and the 2nd is paired to the body of the <tt>newExchange</tt>:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public String append(String existing, String next) {
+  return existing + next;
+}
+]]></script>
+</div></div>
+
+<p>In the method below, we have only 4 parameters, so the 1st parameter is the body of the <tt>oldExchange</tt>, and the 2nd is the Map of the <tt>oldExchange} headers, and the 3rd is paired to the body of the {{newExchange</tt>, and the 4th parameter is the Map of the <tt>newExchange</tt> headers:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public String append(String existing, Map existingHeaders, String next, Map nextHeaders) {
+  return existing + next;
+}
+]]></script>
+</div></div>
+
+<p>And finally if we have 6 parameters the we also have the properties of the <a shape="rect" href="exchange.html" title="Exchange">Exchange</a>s:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public String append(String existing, Map existingHeaders, Map existingProperties, String next, Map nextHeaders, Map nextProperties) {
+  return existing + next;
+}
+]]></script>
+</div></div>
+
+
+
 <h3><a shape="rect" name="BookPatternAppendix-Seealso"></a>See also</h3>
 <ul class="alternate" type="square"><li>The <a shape="rect" href="loan-broker-example.html" title="Loan Broker Example">Loan Broker Example</a> which uses an aggregator</li><li><a shape="rect" class="external-link" href="http://tmielke.blogspot.com/2009/01/using-camel-aggregator-correctly.html" rel="nofollow">Blog post by Torsten Mielke</a> about using the aggregator correctly.</li><li>The old <a shape="rect" href="aggregator.html" title="Aggregator">Aggregator</a></li><li><a shape="rect" href="hawtdb.html" title="HawtDB">HawtDB</a>, <a shape="rect" href="leveldb.html" title="LevelDB">LevelDB</a> or <a shape="rect" href="sql-component.html" title="SQL Component">SQL Component</a> for persistence support</li><li><a shape="rect" href="aggregate-example.html" title="Aggregate Example">Aggregate Example</a> for an example application</li></ul>
 

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