Author: buildbot
Date: Mon Jul 13 11:20:09 2015
New Revision: 958118

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/book-pattern-appendix.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/camel-2160-release.html
    websites/production/camel/content/content-enricher.html

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Mon Jul 13 11:20:09 
2015
@@ -3679,11 +3679,11 @@ The tutorial has been designed in two pa
 While not actual tutorials you might find working through the source of the 
various <a shape="rect" href="examples.html">Examples</a> useful.</li></ul>
 
 <h2 id="BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring 
Remoting with JMS</h2><p>&#160;</p><div class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Thanks</p><span 
class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>This tutorial was kindly donated 
to Apache Camel by Martin Gilday.</p></div></div><h2 
id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the 
reader through the stages of creating a project which uses Camel to facilitate 
the routing of messages from a JMS queue to a <a shape="rect" 
class="external-link" href="http://www.springramework.org"; 
rel="nofollow">Spring</a> service. The route works in a synchronous fashion 
returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1436782718452 {padding: 0px;}
-div.rbtoc1436782718452 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1436782718452 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1436786310265 {padding: 0px;}
+div.rbtoc1436786310265 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1436786310265 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1436782718452">
+/*]]>*/</style></p><div class="toc-macro rbtoc1436786310265">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring 
Remoting with JMS</a></li><li><a shape="rect" 
href="#BookInOnePage-Preface">Preface</a></li><li><a shape="rect" 
href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" 
href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" 
href="#BookInOnePage-About">About</a></li><li><a shape="rect" 
href="#BookInOnePage-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-UpdatethePOMwithDependencies">Update the POM with 
Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#BookInOnePage-WritingtheServer">Writing the 
Server</a>
@@ -5783,11 +5783,11 @@ So we completed the last piece in the pi
 <p>This example has been removed from <strong>Camel 2.9</strong> onwards. 
Apache Axis 1.4 is a very old and unsupported framework. We encourage users to 
use <a shape="rect" href="cxf.html">CXF</a> instead of Axis.</p></div></div>
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1436782718808 {padding: 0px;}
-div.rbtoc1436782718808 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1436782718808 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1436786310533 {padding: 0px;}
+div.rbtoc1436786310533 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1436786310533 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1436782718808">
+/*]]>*/</style><div class="toc-macro rbtoc1436786310533">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 
1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" 
href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" 
href="#BookInOnePage-Introduction">Introduction</a></li><li><a shape="rect" 
href="#BookInOnePage-SettinguptheprojecttorunAxis">Setting up the project to 
run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-Maven2">Maven 2</a></li><li><a shape="rect" 
href="#BookInOnePage-wsdl">wsdl</a></li><li><a shape="rect" 
href="#BookInOnePage-ConfiguringAxis">Configuring Axis</a></li><li><a 
shape="rect" href="#BookInOnePage-RunningtheExample">Running the 
Example</a></li></ul>
@@ -15225,7 +15225,7 @@ from(&quot;direct:resource&quot;)
     
 }
 ]]></script>
-</div></div><p>Using this template the original exchange can be of any 
pattern. The resource exchange created by the enricher is always an in-out 
exchange.</p><p><strong>Using Spring XML</strong></p><p>The same example in the 
Spring DSL</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div><p>Using this template the original exchange can be of any 
pattern. The resource exchange created by the enricher is always an in-out 
exchange.</p><p><strong>Using Spring XML</strong></p><p>The same example in the 
Spring DSL (Camel 2.15 or older)</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext id=&quot;camel&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
   &lt;route&gt;
     &lt;from uri=&quot;direct:start&quot;/&gt;
@@ -15240,37 +15240,108 @@ from(&quot;direct:resource&quot;)
 
 &lt;bean id=&quot;aggregationStrategy&quot; class=&quot;...&quot; /&gt;
 ]]></script>
-</div></div><h4 id="BookInOnePage-Aggregationstrategyisoptional">Aggregation 
strategy is optional</h4><p>The aggregation strategy is optional. If you do not 
provide it Camel will by default just use the body obtained from the 
resource.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div><p>The same example in the Spring DSL (Camel 2.16 or 
newer)</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext id=&quot;camel&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;enrich strategyRef=&quot;aggregationStrategy&quot;&gt;
+      &lt;constant&gt;direct:resource&lt;/constant&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+  &lt;route&gt;
+    &lt;from uri=&quot;direct:resource&quot;/&gt;
+    ...
+  &lt;/route&gt;
+&lt;/camelContext&gt;
+
+&lt;bean id=&quot;aggregationStrategy&quot; class=&quot;...&quot; /&gt;
+]]></script>
+</div></div><p>&#160;</p><h4 
id="BookInOnePage-Aggregationstrategyisoptional">Aggregation strategy is 
optional</h4><p>The aggregation strategy is optional. If you do not provide it 
Camel will by default just use the body obtained from the resource.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
   .enrich(&quot;direct:resource&quot;)
   .to(&quot;direct:result&quot;);
 ]]></script>
-</div></div><p>In the route above the message sent to the 
<code>direct:result</code> endpoint will contain the output from the 
<code>direct:resource</code> as we do not use any custom aggregation.</p><p>And 
for Spring DSL just omit the <code>strategyRef</code> attribute:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>In the route above the message sent to the 
<code>direct:result</code> endpoint will contain the output from the 
<code>direct:resource</code> as we do not use any custom aggregation.</p><p>And 
for Spring DSL (Camel 2.15 or older) just omit the <code>strategyRef</code> 
attribute:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
     &lt;from uri=&quot;direct:start&quot;/&gt;
     &lt;enrich uri=&quot;direct:resource&quot;/&gt;
     &lt;to uri=&quot;direct:result&quot;/&gt;
   &lt;/route&gt;
 ]]></script>
+</div></div><p>And for Spring DSL (Camel 2.16 or newer) just omit 
the&#160;<code>strategyRef</code>&#160;attribute:</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;enrich&gt;
+      &lt;constant&gt;direct:resource&lt;/constant&gt;
+    &lt;/enrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
+</div></div><h3 id="BookInOnePage-Usingdynamicuris">Using dynamic 
uris</h3><p><strong>Available as of Camel 2.16</strong></p><p>From Camel 2.16 
onwards enrich and pollEnrich supports using dynamic uris computed based on 
information from the current&#160;<a shape="rect" 
href="exchange.html">Exchange</a>. For example to enrich from a&#160;<a 
shape="rect" href="http.html">HTTP</a> endpoint where the header with key 
orderId is used as part of the content-path of the HTTP url:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
+  .enrich().simple(&quot;http:myserver/${header.orderId}/order&quot;)
+  .to(&quot;direct:result&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="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;enrich&gt;
+      &lt;simple&gt;http:myserver/${header.orderId}/order&lt;/simple&gt;
+    &lt;/enrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
 </div></div><h3 id="BookInOnePage-ContentenrichmentusingpollEnrich">Content 
enrichment using <code>pollEnrich</code></h3><p>The <code>pollEnrich</code> 
works just as the <code>enrich</code> however as it uses a <a shape="rect" 
href="polling-consumer.html">Polling Consumer</a> we have 3 methods when 
polling</p><ul 
class="alternate"><li>receive</li><li>receiveNoWait</li><li>receive(timeout)</li></ul><h3
 id="BookInOnePage-PollEnrichOptions">PollEnrich Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>uri</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The endpoint uri
  for the external service to enrich from. You must use either <code>uri</code> 
or <code>ref</code>. <strong>Important:</strong><span> From Camel 2.16 onwards, 
this option is removed, and you use an </span><a shape="rect" 
href="expression.html">Expression</a><span> to configure the uri, such as 
</span><a shape="rect" href="simple.html">Simple</a><span> or </span><a 
shape="rect" href="constant.html">Constant</a><span> or any other dynamic 
language that can compute the uri dynamically using values from the current 
</span><span>&#160;</span><a shape="rect" 
href="exchange.html">Exchange</a><span>.</span></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>ref</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Refers to the endpoint for the external 
service to enrich from. You must use either <code>uri</code> or 
<code>ref</code>. <strong>Important:</strong><span> From Camel 2.16 onwar
 ds, this option is removed, and you use an </span><a shape="rect" 
href="expression.html">Expression</a><span> to configure the uri, such as 
</span><a shape="rect" href="simple.html">Simple</a><span> or </span><a 
shape="rect" href="constant.html">Constant</a><span> or any other dynamic 
language that can compute the uri dynamically using values from the current 
</span><span>&#160;</span><a shape="rect" 
href="exchange.html">Exchange</a><span>.</span></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><code>expression</code></td><td 
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong><span> Mandatory. 
The</span><span>&#160;</span><a shape="rect" 
href="expression.html">Expression</a><span> to configure the uri, such as 
</span><a shape="rect" href="simple.html">Simple</a><span> or </span><a 
shape="rect" href="constant.html">Constant</a><span> or any other dynamic 
language that can compute the u
 ri dynamically using values from the current </span><span>&#160;</span><a 
shape="rect" href="exchange.html">Exchange</a><span>.</span></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>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 merge the reply from the external service, into a single 
outgoing message. By default Camel will use the reply from the external service 
as outgoing message. From <strong>Camel 2.12</strong> onwards you can also use 
a POJO as the <code>AggregationStrategy</code>, see the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strate
 gyMethodName</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.12:</strong> This option can be used to 
explicit declare the method name to use, when using POJOs as the 
<code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodAllowNull</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> If 
this option is <code>false</code> then the aggregate method is not used if 
there was no data to enrich. If this option is <code>true</code> then 
<code>null</code> values is used as the <code>oldExchange</code> (when no data 
to enrich), when using POJOs as the <code>AggregationStrategy</code>. See the 
<a shape="rect" href="aggregato
 r2.html">Aggregate</a> page for more details.</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><code>-1</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Timeout in millis when polling 
from the external service. See below for important details about the 
timeout.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><code>aggregateOnException</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.14:</strong> If this option is 
<code>false</code> then the aggregate method is <strong>not</strong> used if 
there was an exception thrown while trying to retrieve the data to enrich from 
the resource. Setting this option to <code>true</code> allows end users to 
control what to do if there was an exception in the <code>aggregate</code> 
method. For example to suppress the ex
 ception or set a custom message body etc.</td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><code>cacheSize</code></td><td colspan="1" 
rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel 2.16:</strong> <span style="color: 
rgb(0,0,0);">Allows to configure the cache size for 
the&#160;</span><code>ConsumerCache</code><span style="color: 
rgb(0,0,0);">&#160;which caches consumers for reuse in the pollEnrich. Will by 
default use the default cache size which is 1000. Setting the value to -1 
allows to turn off the cache all 
together.</span></td></tr></tbody></table></div></div><div 
class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Good practice to use 
timeout value</p><span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>By default Camel will use the 
<code>receive</code>. Which may block u
 ntil there is a message available. It is therefore recommended to always 
provide a timeout value, to make this clear that we may wait for a message, 
until the timeout is hit.</p></div></div><p>If there is no data then the 
<code>newExchange</code> in the aggregation strategy is 
<code>null</code>.</p><p>You can pass in a timeout value that determines which 
method to use</p><ul class="alternate"><li>if timeout is -1 or other negative 
number then <code>receive</code> is selected (<strong>Important:</strong> the 
<code>receive</code> method may block if there is no message)</li><li>if 
timeout is 0 then <code>receiveNoWait</code> is selected</li><li>otherwise 
<code>receive(timeout)</code> is selected</li></ul><p>The timeout values is in 
millis.</p><div class="confluence-information-macro 
confluence-information-macro-warning"><p class="title">Camel 2.15 or older - 
Data from current Exchange not used</p><span class="aui-icon aui-icon-small 
aui-iconfont-error confluence-information-macro-icon
 "></span><div 
class="confluence-information-macro-body"><p><code>pollEnrich</code> does 
<strong>not</strong> access any data from the current <a shape="rect" 
href="exchange.html">Exchange</a> which means when polling it cannot use any of 
the existing headers you may have set on the <a shape="rect" 
href="exchange.html">Exchange</a>. For example you cannot set a filename in the 
<code>Exchange.FILE_NAME</code> header and use <code>pollEnrich</code> to 
consume only that file. For that you <strong>must</strong> set the filename in 
the endpoint URI.</p><p><span>From </span><strong>Camel 2.16</strong><span> 
onwards both enrich and pollEnrich supports dynamic endpoints that uses an 
</span><a shape="rect" href="expression.html">Expression</a><span> to compute 
the uri, which allows to use data from the current </span><a shape="rect" 
href="exchange.html">Exchange</a><span>. In other words all what is told above 
no longer apply and it just works.</span></p></div></div><h4 
id="BookInOnePage-Exam
 ple.11">Example</h4><p>In this example we enrich the message by loading the 
content from the file named inbox/data.txt.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
   .pollEnrich(&quot;file:inbox?fileName=data.txt&quot;)
   .to(&quot;direct:result&quot;);
 ]]></script>
-</div></div><p>And in XML DSL you do:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And in XML DSL (Camel 2.15 or older) you do:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
     &lt;from uri=&quot;direct:start&quot;/&gt;
     &lt;pollEnrich uri=&quot;file:inbox?fileName=data.txt&quot;/&gt;
     &lt;to uri=&quot;direct:result&quot;/&gt;
   &lt;/route&gt;
 ]]></script>
-</div></div><p>If there is no file then the message is empty. We can use a 
timeout to either wait (potentially forever) until a file exists, or use a 
timeout to wait a certain period.</p><p>For example to wait up to 5 seconds you 
can do:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div><p>And in XML DSL (Camel 2.16 or newer) you do:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;pollEnrich&gt;
+      &lt;constant&gt;file:inbox?fileName=data.txt&lt;/constant&gt;
+    &lt;/pollEnrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
+</div></div><p>&#160;</p><p>If there is no file then the message is empty. We 
can use a timeout to either wait (potentially forever) until a file exists, or 
use a timeout to wait a certain period.</p><p>For example to wait up to 5 
seconds you can do (Camel 2.15 or older):</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
     &lt;from uri=&quot;direct:start&quot;/&gt;
     &lt;pollEnrich uri=&quot;file:inbox?fileName=data.txt&quot; 
timeout=&quot;5000&quot;/&gt;
     &lt;to uri=&quot;direct:result&quot;/&gt;
   &lt;/route&gt;
 ]]></script>
+</div></div><p>For example to wait up to 5 seconds you can do (Camel 2.16 or 
newer):</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;pollEnrich timeout=&quot;5000&quot;&gt;
+      &lt;constant&gt;file:inbox?fileName=data.txt&lt;/constant&gt;
+    &lt;/pollEnrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
+</div></div><h3 id="BookInOnePage-Usingdynamicuris.1">Using dynamic 
uris</h3><p><strong>Available as of Camel 2.16</strong></p><p>From Camel 2.16 
onwards enrich and pollEnrich supports using dynamic uris computed based on 
information from the current&#160;<a shape="rect" 
href="exchange.html">Exchange</a>. For example to pollEnrich from an endpoint 
that uses a header to indicate a&#160;<a shape="rect" 
href="seda.html">SEDA</a>&#160;queue name:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
+  .pollEnrich().simple(&quot;seda:${header.name}&quot;)
+  .to(&quot;direct:result&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="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;pollEnrich&gt;
+      &lt;simple&gt;seda:${header.name}&lt;/simple&gt;
+    &lt;/pollEnrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
 </div></div><p></p><h4 id="BookInOnePage-UsingThisPattern.30">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>
@@ -17678,11 +17749,11 @@ template.send(&quot;direct:alias-verify&
 ]]></script>
 </div></div><p></p><h3 id="BookInOnePage-SeeAlso.28">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring 
Camel</a></li><li><a shape="rect" 
href="component.html">Component</a></li><li><a shape="rect" 
href="endpoint.html">Endpoint</a></li><li><a shape="rect" 
href="getting-started.html">Getting Started</a></li></ul><ul><li><a 
shape="rect" href="crypto.html">Crypto</a> Crypto is also available as a <a 
shape="rect" href="data-format.html">Data Format</a></li></ul> <h2 
id="BookInOnePage-CXFComponent">CXF Component</h2><div 
class="confluence-information-macro confluence-information-macro-note"><span 
class="aui-icon aui-icon-small aui-iconfont-warning 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>When using CXF as a consumer, the 
<a shape="rect" href="cxf-bean-component.html">CXF Bean Component</a> allows 
you to factor out how message payloads are received from their processing as a 
RESTful or SOAP web service. This has the potential of using a multitude of 
transports to consume web 
 services. The bean component's configuration is also simpler and provides the 
fastest method to implement web services using Camel and 
CXF.</p></div></div><div class="confluence-information-macro 
confluence-information-macro-tip"><span class="aui-icon aui-icon-small 
aui-iconfont-approve confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>When using CXF in streaming modes 
(see DataFormat option), then also read about <a shape="rect" 
href="stream-caching.html">Stream caching</a>.</p></div></div><p>The 
<strong>cxf:</strong> component provides integration with <a shape="rect" 
href="http://cxf.apache.org";>Apache CXF</a> for connecting to JAX-WS services 
hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1436782731891 {padding: 0px;}
-div.rbtoc1436782731891 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1436782731891 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1436786321554 {padding: 0px;}
+div.rbtoc1436786321554 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1436786321554 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1436782731891">
+/*]]>*/</style></p><div class="toc-macro rbtoc1436786321554">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-CXFComponent">CXF Component</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-URIformat">URI format</a></li><li><a shape="rect" 
href="#BookInOnePage-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookInOnePage-Thedescriptionsofthedataformats">The descriptions of the 
dataformats</a>

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 Jul 13 
11:20:09 2015
@@ -3445,7 +3445,7 @@ from(&quot;direct:resource&quot;)
     
 }
 ]]></script>
-</div></div><p>Using this template the original exchange can be of any 
pattern. The resource exchange created by the enricher is always an in-out 
exchange.</p><p><strong>Using Spring XML</strong></p><p>The same example in the 
Spring DSL</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div><p>Using this template the original exchange can be of any 
pattern. The resource exchange created by the enricher is always an in-out 
exchange.</p><p><strong>Using Spring XML</strong></p><p>The same example in the 
Spring DSL (Camel 2.15 or older)</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext id=&quot;camel&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
   &lt;route&gt;
     &lt;from uri=&quot;direct:start&quot;/&gt;
@@ -3460,37 +3460,108 @@ from(&quot;direct:resource&quot;)
 
 &lt;bean id=&quot;aggregationStrategy&quot; class=&quot;...&quot; /&gt;
 ]]></script>
-</div></div><h4 
id="BookPatternAppendix-Aggregationstrategyisoptional">Aggregation strategy is 
optional</h4><p>The aggregation strategy is optional. If you do not provide it 
Camel will by default just use the body obtained from the resource.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>The same example in the Spring DSL (Camel 2.16 or 
newer)</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext id=&quot;camel&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;enrich strategyRef=&quot;aggregationStrategy&quot;&gt;
+      &lt;constant&gt;direct:resource&lt;/constant&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+  &lt;route&gt;
+    &lt;from uri=&quot;direct:resource&quot;/&gt;
+    ...
+  &lt;/route&gt;
+&lt;/camelContext&gt;
+
+&lt;bean id=&quot;aggregationStrategy&quot; class=&quot;...&quot; /&gt;
+]]></script>
+</div></div><p>&#160;</p><h4 
id="BookPatternAppendix-Aggregationstrategyisoptional">Aggregation strategy is 
optional</h4><p>The aggregation strategy is optional. If you do not provide it 
Camel will by default just use the body obtained from the resource.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
   .enrich(&quot;direct:resource&quot;)
   .to(&quot;direct:result&quot;);
 ]]></script>
-</div></div><p>In the route above the message sent to the 
<code>direct:result</code> endpoint will contain the output from the 
<code>direct:resource</code> as we do not use any custom aggregation.</p><p>And 
for Spring DSL just omit the <code>strategyRef</code> attribute:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>In the route above the message sent to the 
<code>direct:result</code> endpoint will contain the output from the 
<code>direct:resource</code> as we do not use any custom aggregation.</p><p>And 
for Spring DSL (Camel 2.15 or older) just omit the <code>strategyRef</code> 
attribute:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
     &lt;from uri=&quot;direct:start&quot;/&gt;
     &lt;enrich uri=&quot;direct:resource&quot;/&gt;
     &lt;to uri=&quot;direct:result&quot;/&gt;
   &lt;/route&gt;
 ]]></script>
+</div></div><p>And for Spring DSL (Camel 2.16 or newer) just omit 
the&#160;<code>strategyRef</code>&#160;attribute:</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;enrich&gt;
+      &lt;constant&gt;direct:resource&lt;/constant&gt;
+    &lt;/enrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
+</div></div><h3 id="BookPatternAppendix-Usingdynamicuris">Using dynamic 
uris</h3><p><strong>Available as of Camel 2.16</strong></p><p>From Camel 2.16 
onwards enrich and pollEnrich supports using dynamic uris computed based on 
information from the current&#160;<a shape="rect" 
href="exchange.html">Exchange</a>. For example to enrich from a&#160;<a 
shape="rect" href="http.html">HTTP</a> endpoint where the header with key 
orderId is used as part of the content-path of the HTTP url:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
+  .enrich().simple(&quot;http:myserver/${header.orderId}/order&quot;)
+  .to(&quot;direct:result&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="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;enrich&gt;
+      &lt;simple&gt;http:myserver/${header.orderId}/order&lt;/simple&gt;
+    &lt;/enrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
 </div></div><h3 
id="BookPatternAppendix-ContentenrichmentusingpollEnrich">Content enrichment 
using <code>pollEnrich</code></h3><p>The <code>pollEnrich</code> works just as 
the <code>enrich</code> however as it uses a <a shape="rect" 
href="polling-consumer.html">Polling Consumer</a> we have 3 methods when 
polling</p><ul 
class="alternate"><li>receive</li><li>receiveNoWait</li><li>receive(timeout)</li></ul><h3
 id="BookPatternAppendix-PollEnrichOptions">PollEnrich Options</h3><div 
class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>uri</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The 
 endpoint uri for the external service to enrich from. You must use either 
<code>uri</code> or <code>ref</code>. <strong>Important:</strong><span> From 
Camel 2.16 onwards, this option is removed, and you use an </span><a 
shape="rect" href="expression.html">Expression</a><span> to configure the uri, 
such as </span><a shape="rect" href="simple.html">Simple</a><span> or </span><a 
shape="rect" href="constant.html">Constant</a><span> or any other dynamic 
language that can compute the uri dynamically using values from the current 
</span><span>&#160;</span><a shape="rect" 
href="exchange.html">Exchange</a><span>.</span></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>ref</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Refers to the endpoint for the external 
service to enrich from. You must use either <code>uri</code> or 
<code>ref</code>. <strong>Important:</strong><span> From Came
 l 2.16 onwards, this option is removed, and you use an </span><a shape="rect" 
href="expression.html">Expression</a><span> to configure the uri, such as 
</span><a shape="rect" href="simple.html">Simple</a><span> or </span><a 
shape="rect" href="constant.html">Constant</a><span> or any other dynamic 
language that can compute the uri dynamically using values from the current 
</span><span>&#160;</span><a shape="rect" 
href="exchange.html">Exchange</a><span>.</span></p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><code>expression</code></td><td 
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong><span> Mandatory. 
The</span><span>&#160;</span><a shape="rect" 
href="expression.html">Expression</a><span> to configure the uri, such as 
</span><a shape="rect" href="simple.html">Simple</a><span> or </span><a 
shape="rect" href="constant.html">Constant</a><span> or any other dynamic 
language that can c
 ompute the uri dynamically using values from the current 
</span><span>&#160;</span><a shape="rect" 
href="exchange.html">Exchange</a><span>.</span></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>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 merge the reply from the external service, into a single 
outgoing message. By default Camel will use the reply from the external service 
as outgoing message. From <strong>Camel 2.12</strong> onwards you can also use 
a POJO as the <code>AggregationStrategy</code>, see the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
 <code>strategyMethodName</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.12:</strong> This option can be used to 
explicit declare the method name to use, when using POJOs as the 
<code>AggregationStrategy</code>. See the <a shape="rect" 
href="aggregator2.html">Aggregate</a> page for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>strategyMethodAllowNull</code></p></td><td 
colspan="1" 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" hre
 f="aggregator2.html">Aggregate</a> page for more details.</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><code>-1</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Timeout in millis when polling from the 
external service. See below for important details about the 
timeout.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><code>aggregateOnException</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.14:</strong> If this option is 
<code>false</code> then the aggregate method is <strong>not</strong> used if 
there was an exception thrown while trying to retrieve the data to enrich from 
the resource. Setting this option to <code>true</code> allows end users to 
control what to do if there was an exception in the <code>aggregate</code> 
method. For example to sup
 press the exception or set a custom message body etc.</td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><code>cacheSize</code></td><td 
colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> <span 
style="color: rgb(0,0,0);">Allows to configure the cache size for 
the&#160;</span><code>ConsumerCache</code><span style="color: 
rgb(0,0,0);">&#160;which caches consumers for reuse in the pollEnrich. Will by 
default use the default cache size which is 1000. Setting the value to -1 
allows to turn off the cache all 
together.</span></td></tr></tbody></table></div></div><div 
class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Good practice to use 
timeout value</p><span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>By default Camel will use the 
<code>receive</code>. Which
  may block until there is a message available. It is therefore recommended to 
always provide a timeout value, to make this clear that we may wait for a 
message, until the timeout is hit.</p></div></div><p>If there is no data then 
the <code>newExchange</code> in the aggregation strategy is 
<code>null</code>.</p><p>You can pass in a timeout value that determines which 
method to use</p><ul class="alternate"><li>if timeout is -1 or other negative 
number then <code>receive</code> is selected (<strong>Important:</strong> the 
<code>receive</code> method may block if there is no message)</li><li>if 
timeout is 0 then <code>receiveNoWait</code> is selected</li><li>otherwise 
<code>receive(timeout)</code> is selected</li></ul><p>The timeout values is in 
millis.</p><div class="confluence-information-macro 
confluence-information-macro-warning"><p class="title">Camel 2.15 or older - 
Data from current Exchange not used</p><span class="aui-icon aui-icon-small 
aui-iconfont-error confluence-informatio
 n-macro-icon"></span><div 
class="confluence-information-macro-body"><p><code>pollEnrich</code> does 
<strong>not</strong> access any data from the current <a shape="rect" 
href="exchange.html">Exchange</a> which means when polling it cannot use any of 
the existing headers you may have set on the <a shape="rect" 
href="exchange.html">Exchange</a>. For example you cannot set a filename in the 
<code>Exchange.FILE_NAME</code> header and use <code>pollEnrich</code> to 
consume only that file. For that you <strong>must</strong> set the filename in 
the endpoint URI.</p><p><span>From </span><strong>Camel 2.16</strong><span> 
onwards both enrich and pollEnrich supports dynamic endpoints that uses an 
</span><a shape="rect" href="expression.html">Expression</a><span> to compute 
the uri, which allows to use data from the current </span><a shape="rect" 
href="exchange.html">Exchange</a><span>. In other words all what is told above 
no longer apply and it just works.</span></p></div></div><h4 id="BookPa
 tternAppendix-Example.5">Example</h4><p>In this example we enrich the message 
by loading the content from the file named inbox/data.txt.</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
   .pollEnrich(&quot;file:inbox?fileName=data.txt&quot;)
   .to(&quot;direct:result&quot;);
 ]]></script>
-</div></div><p>And in XML DSL you do:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And in XML DSL (Camel 2.15 or older) you do:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
     &lt;from uri=&quot;direct:start&quot;/&gt;
     &lt;pollEnrich uri=&quot;file:inbox?fileName=data.txt&quot;/&gt;
     &lt;to uri=&quot;direct:result&quot;/&gt;
   &lt;/route&gt;
 ]]></script>
-</div></div><p>If there is no file then the message is empty. We can use a 
timeout to either wait (potentially forever) until a file exists, or use a 
timeout to wait a certain period.</p><p>For example to wait up to 5 seconds you 
can do:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+</div></div><p>And in XML DSL (Camel 2.16 or newer) you do:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;pollEnrich&gt;
+      &lt;constant&gt;file:inbox?fileName=data.txt&lt;/constant&gt;
+    &lt;/pollEnrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
+</div></div><p>&#160;</p><p>If there is no file then the message is empty. We 
can use a timeout to either wait (potentially forever) until a file exists, or 
use a timeout to wait a certain period.</p><p>For example to wait up to 5 
seconds you can do (Camel 2.15 or older):</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
     &lt;from uri=&quot;direct:start&quot;/&gt;
     &lt;pollEnrich uri=&quot;file:inbox?fileName=data.txt&quot; 
timeout=&quot;5000&quot;/&gt;
     &lt;to uri=&quot;direct:result&quot;/&gt;
   &lt;/route&gt;
 ]]></script>
+</div></div><p>For example to wait up to 5 seconds you can do (Camel 2.16 or 
newer):</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;pollEnrich timeout=&quot;5000&quot;&gt;
+      &lt;constant&gt;file:inbox?fileName=data.txt&lt;/constant&gt;
+    &lt;/pollEnrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
+</div></div><h3 id="BookPatternAppendix-Usingdynamicuris.1">Using dynamic 
uris</h3><p><strong>Available as of Camel 2.16</strong></p><p>From Camel 2.16 
onwards enrich and pollEnrich supports using dynamic uris computed based on 
information from the current&#160;<a shape="rect" 
href="exchange.html">Exchange</a>. For example to pollEnrich from an endpoint 
that uses a header to indicate a&#160;<a shape="rect" 
href="seda.html">SEDA</a>&#160;queue name:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
+  .pollEnrich().simple(&quot;seda:${header.name}&quot;)
+  .to(&quot;direct:result&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="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[  &lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;pollEnrich&gt;
+      &lt;simple&gt;seda:${header.name}&lt;/simple&gt;
+    &lt;/pollEnrich&gt;
+    &lt;to uri=&quot;direct:result&quot;/&gt;
+  &lt;/route&gt;
+]]></script>
 </div></div><p></p><h4 id="BookPatternAppendix-UsingThisPattern.30">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>

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


Reply via email to