Author: buildbot
Date: Sun Jul  9 22:38:25 2017
New Revision: 1015178

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/async.html
    websites/production/camel/content/book-component-appendix.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/book-pattern-appendix.html
    websites/production/camel/content/book-tutorials.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/camel-jmx.html
    websites/production/camel/content/console-example.html
    websites/production/camel/content/debugger.html
    websites/production/camel/content/exception-clause.html
    websites/production/camel/content/file2.html
    websites/production/camel/content/how-can-i-stop-a-route-from-a-route.html
    websites/production/camel/content/pojo-messaging-example.html
    websites/production/camel/content/resequencer.html
    websites/production/camel/content/route-throttling-example.html
    websites/production/camel/content/throttler.html
    websites/production/camel/content/tracer-example.html
    websites/production/camel/content/tutorial-jmsremoting.html

Modified: websites/production/camel/content/async.html
==============================================================================
--- websites/production/camel/content/async.html (original)
+++ websites/production/camel/content/async.html Sun Jul  9 22:38:25 2017
@@ -86,7 +86,7 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 
id="Async-Async">Async</h2><p><strong>Available as of Camel 
2.0</strong></p><p>The asynchronous API in Camel have been rewritten for Camel 
2.0, and the information on this page applies for Camel 2.0 and 
later.</p><p>The <a shape="rect" href="async.html">Async</a> API in Camel is 
primarily divided in two areas:</p><ol><li>Initiating an <a shape="rect" 
href="async.html">Async</a> messaging from the client</li><li>Turning a route 
into <a shape="rect" href="async.html">Async</a> using the 
<strong>threads</strong> <a shape="rect" 
href="dsl.html">DSL</a></li></ol><p>Before we look at these two areas we start 
with a bit of background information and looks at the concept from at a higher 
level using diagrams. Then we check out the first area how a client can 
initiate an <a shape="rect" href="async.html">Async</a> message exchange and we 
also throw in the synchronous message exchange in the mix as well so we can 
compare and distill the difference. An
 d finally we turn our attention towards the last area the new 
<strong>threads</strong> DSL and what it can be used for.</p><h2 
id="Async-Background">Background</h2><p>The new <a shape="rect" 
href="async.html">Async</a> API in Camel 2.0 leverages in much greater detail 
the Java Concurrency API and its support for executing tasks asynchronous. 
Therefore the Camel <a shape="rect" href="async.html">Async</a> API should be 
familiar for users with knowledge of the Java Concurrency API.</p><h3 
id="Async-Afewconceptstomaster">A few concepts to master</h3><p>When doing 
messaging there are a few aspects to keep in mind. First of all a caller can 
initiate a message exchange as either:</p><ul class="alternate"><li><a 
shape="rect" href="event-message.html">Request only</a></li><li><a shape="rect" 
href="request-reply.html">Request Reply</a></li></ul><p><a shape="rect" 
href="event-message.html">Request only</a> is when the caller sends a message 
but do <strong>not</strong> expect any reply. This i
 s also known as fire and forget or event message. The <a shape="rect" 
href="request-reply.html">Request Reply</a> is when the caller sends a message 
and then <strong>waits for a reply</strong>. This is like the <a shape="rect" 
href="http.html">HTTP</a> protocol that we use every day when we surf the web. 
We send a request to fetch a web page and wait until the reply message comes 
with the web content.</p><p>In Camel a message is labeled with a Message <a 
shape="rect" href="exchange-pattern.html">Exchange Pattern</a> that labels 
whether its a request only or request reply message. Camel uses the <a 
shape="rect" href="jbi.html">JBI</a> term for this an uses 
<strong><code>InOnly</code></strong> for the request only, and 
<strong><code>InOut</code></strong> for the request reply.</p><p>For all 
message exchange they can be executed either:</p><ul 
class="alternate"><li>synchronous</li><li>asynchronous</li></ul><h4 
id="Async-SynchronousRequestReply">Synchronous Request Reply</h4><p>A synchr
 onous exchange is defined as the caller sends a message and waits until its 
complete before continuing.</p><p>This is illustrated in the diagram 
below:</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image" src="async.data/camel_sync_request_reply.png" 
data-image-src="/confluence/download/attachments/117116/camel_sync_request_reply.png?version=1&amp;modificationDate=1241917552000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="10641" 
data-linked-resource-version="1" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="camel_sync_request_reply.png" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="117116" 
data-linked-resource-container-version="55"></span></p><ol><li>The client sends 
a sync <a shape="rect" href="request-reply.html">Request Reply</a> message over 
<a shape="rect" href="http.html">HTTP</a> to Camel. The clie
 nt application will wait for the response that Camel routes and 
processes.</li><li>The message invokes an external <a shape="rect" 
href="mina.html">TCP</a> service using synchronous <a shape="rect" 
href="request-reply.html">Request Reply</a>. The client application still waits 
for the response.</li><li>The response is send back to the client.</li></ol><h4 
id="Async-AsynchronousRequestReply">Asynchronous Request Reply</h4><p>On the 
other hand the asynchronous version is where the caller sends a message to an 
<a shape="rect" href="endpoint.html">Endpoint</a> and then returns immediately 
back to the caller. The message however is processed in another thread, the 
asynchronous thread. Then the caller can continue doing other work and at the 
same time the asynchronous thread is processing the message.</p><p>This is 
illustrated in the diagram below:</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" 
src="async.data/camel_async_request_reply.png" dat
 
a-image-src="/confluence/download/attachments/117116/camel_async_request_reply.png?version=2&amp;modificationDate=1241928088000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="10640" 
data-linked-resource-version="2" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="camel_async_request_reply.png" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="117116" 
data-linked-resource-container-version="55"></span></p><ol><li>The client sends 
an <a shape="rect" href="async.html">Async</a><a shape="rect" 
href="request-reply.html">Request Reply</a> message over <a shape="rect" 
href="http.html">HTTP</a> to Camel. The control is immediately returned to the 
client application, that can continue and do other work while Camel routes the 
message.</li><li>Camel invokes an external <a shape="rect" 
href="mina.html">TCP</a> service using synchronous <a shape="rect" href="reques
 t-reply.html">Request Reply</a>. The client application can do other work 
simultaneously.</li><li>The client wants to get the reply so it uses the Future 
handle it got as <em>response</em> from step 1. With this handle it retrieves 
the reply, wait if necessary if the reply is not 
ready.</li></ol><p>&#160;</p><h4 id="Async-SynchronousRequestOnly">Synchronous 
Request Only</h4><p>&#160;</p><p>You can also do synchronous <a shape="rect" 
href="event-message.html">Request only</a> with Camel. The client sends a 
message to Camel in which a reply is not expected. However the client still 
waits until the message is processed completely.</p><p>This is illustrated in 
the diagram below:</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image" src="async.data/camel_sync_request_only.png" 
data-image-src="/confluence/download/attachments/117116/camel_sync_request_only.png?version=1&amp;modificationDate=1241923637000&amp;api=v2"
 data-unresolved-comment-count="0" d
 ata-linked-resource-id="10642" data-linked-resource-version="1" 
data-linked-resource-type="attachment" 
data-linked-resource-default-alias="camel_sync_request_only.png" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="117116" 
data-linked-resource-container-version="55"></span></p><ol><li>The client sends 
a <a shape="rect" href="event-message.html">Request only</a> and we can still 
use <a shape="rect" href="http.html">HTTP</a> despite http being <a 
shape="rect" href="request-reply.html">Request Reply</a> by 
nature.</li><li>Camel invokes an external <a shape="rect" 
href="mina.html">TCP</a> service using synchronous <a shape="rect" 
href="request-reply.html">Request Reply</a>. The client application is still 
waiting.</li><li>The message is processed completely and the control is 
returned to the client.</li></ol><p>So why do you want to use synchronous <a 
shape="rect" href="event-message.html">Request Only
 </a>? Well if you want to know whether the message was processed successfully 
or not before continuing. With synchronous it allows you to wait while the 
message is being processed. In case the processing was successful the control 
is returned to the client with no notion of error. In case of failure the 
client can detect this as an exception is thrown. (and 
<strong><code>exchange.isFailed()</code></strong> returns 
<strong><code>true</code>).</strong></p><h3 
id="Async-AsynchronousRequestOnly">Asynchronous Request Only</h3><p>As opposed 
to the synchronous <a shape="rect" href="event-message.html">Request Only</a> 
the <a shape="rect" href="async.html">Async</a> counter part will 
<strong>not</strong> wait for the processing of the message to complete. In 
this case the client can immediately continue doing other work while the 
message is being routed and processed in Camel.</p><p>This is illustrated in 
the diagram below:</p><p><span class="confluence-embedded-file-wrapper"><img 
class="co
 nfluence-embedded-image" src="async.data/camel_async_request_only.png" 
data-image-src="/confluence/download/attachments/117116/camel_async_request_only.png?version=1&amp;modificationDate=1241928107000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="10644" 
data-linked-resource-version="1" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="camel_async_request_only.png" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="117116" 
data-linked-resource-container-version="55"></span></p><ol><li>The client sends 
a <a shape="rect" href="event-message.html">Request only</a> and we can still 
use <a shape="rect" href="http.html">HTTP</a> despite HTTP being <a 
shape="rect" href="request-reply.html">Request Reply</a> by nature. The control 
is immediately returned to the client application, that can continue and do 
other work while Camel routes the message.</li><li>Camel 
 invokes an external <a shape="rect" href="mina.html">TCP</a> service using 
synchronous <a shape="rect" href="request-reply.html">Request Reply</a>. The 
client application can do other work simultaneously.</li><li>The message 
completes but no result is returned to the client.<br clear="none"><br 
clear="none"></li></ol><div class="confluence-information-macro 
confluence-information-macro-information"><span class="aui-icon aui-icon-small 
aui-iconfont-info confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p><strong>Note:</strong> As Camel 
always returns a <strong><code>Future</code></strong> handle for <a 
shape="rect" href="async.html">Async</a> messaging to the client. The client 
can use this handler to get hold of the status of the processing whether the 
task is complete or an Exception occurred during processing. Note that the 
client is not required to do so, its perfect valid to just ignore the Future 
handle.</p></div></div><div class="conflue
 nce-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>In case you want to know whether 
the <a shape="rect" href="async.html">Async</a> <a shape="rect" 
href="event-message.html">Request Only</a> failed, then you can use the 
<strong><code>Future</code></strong> handle and invoke 
<strong><code>get()</code></strong> and if it throws a 
<strong><code>ExecutionException</code></strong> then the processing failed. 
The caused exception is wrapped. You can invoke 
<strong><code>isDone()</code></strong> first to test whether the task is done 
or still in progress. Otherwise invoking <strong><code>get()</code></strong> 
will wait until the task is done.</p></div></div><p>With these diagrams in mind 
lets turn out attention to the <a shape="rect" href="async.html">Async</a> API 
and how to use it with Camel.</p><h2 id="Async-1)TheClientAPI">1) The <a 
 shape="rect" href="async.html">Async</a> Client API</h2><p>Camel provides the 
<a shape="rect" href="async.html">Async</a> Client API in the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ProducerTemplate.html";>ProducerTemplate</a>
 where we have added about ten new methods to Camel 2.0.</p><p>We have listed 
the most important in the table below:</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Method</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Returns</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>setExecutorService</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>void</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Is used to set the Java 
<strong><code>ExecutorService</code></strong>. C
 amel will by default provide 
a&#160;<strong><code>ScheduledExecutorService</code></strong> with 5 thread in 
the pool.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncSend</code></p></td><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Exchange&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Is used to send an async 
exchange to a Camel <a shape="rect" href="endpoint.html">Endpoint</a>. Camel 
will immediately return control to the caller thread after the task has been 
submitted to the executor service. This allows you to do other work while Camel 
processes the exchange in the other async thread.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncSendBody</code></p></td><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Object&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>As above but for sending body 
only. This is a request only messaging sty
 le so no reply is expected. Uses the <strong><code>InOnly</code></strong> 
exchange pattern.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncRequestBody</code></p></td><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Object&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>As above but for sending body 
only. This is a <a shape="rect" href="request-reply.html">Request Reply</a> 
messaging style so a reply is expected. Uses the 
<strong><code>InOut</code></strong> exchange pattern.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>extractFutureBody</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>T</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Is used to get the result from the 
asynchronous thread using the Java Concurrency Future 
handle.</p></td></tr></tbody></table></div><p>The 
<strong><code>asyncSend</code></strong> and <strong><code>asyncReques
 t</code></strong> methods return a Future handle. This handle is what the 
caller must use later to retrieve the asynchronous response. You can do this by 
using the <strong><code>extractFutureBody</code></strong> method, or just use 
plain Java but invoke <strong><code>get()</code></strong> on the 
<strong><code>Future</code></strong> handle.</p><h3 
id="Async-TheClientAPIwithcallbacks">The <a shape="rect" 
href="async.html">Async</a> Client API with callbacks</h3><p>In addition to the 
Client API from above Camel provides a variation that uses <a shape="rect" 
href="oncompletion.html">callbacks</a> when the message <a shape="rect" 
href="exchange.html">Exchange</a> is done.</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Method</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Returns</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="c
 onfluenceTd"><p><code>asyncCallback</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Exchange&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>In addition a callback is 
passed in as a parameter using the 
<strong><code>org.apache.camel.spi.Synchronization</code></strong> Callback. 
The callback is invoked when the message exchange is done.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncCallbackSendBody</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Object&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>As above but for sending body 
only. This is a request only messaging style so no reply is expected. Uses the 
<strong><code>InOnly</code></strong> exchange pattern.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncCallbackRequestBody</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>Future
 &lt;Object&gt;</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>As above but for sending body only. This is a <a 
shape="rect" href="request-reply.html">Request Reply</a> messaging style so a 
reply is expected. Uses the <strong><code>InOut</code></strong> exchange 
pattern.</p></td></tr></tbody></table></div><p>These methods also returns 
the&#160;<strong><code>Future</code></strong> handle in case you need them. The 
difference is that they invokes the callback as well when the <a shape="rect" 
href="exchange.html">Exchange</a> is done being routed.</p><h4 
id="Async-TheFutureAPI">The Future API</h4><p>The 
<strong><code>java.util.concurrent.Future</code></strong> API have among others 
the following methods:</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Method</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Returns</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description
 </p></th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>isDone</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Returns a boolean whether the task is done 
or not. Will even return <strong><code>true</code></strong> if the tasks failed 
due to an exception thrown.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>get()</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Gets the response of the task. In case of an exception 
was thrown the 
<strong><code>java.util.concurrent.ExecutionException</code></strong> is thrown 
with the caused exception.</p></td></tr></tbody></table></div><h3 
id="Async-Example:AsynchronousRequestReply">Example: Asynchronous Request 
Reply</h3><p>Suppose we want to call a <a shape="rect" 
href="http.html">HTTP</a> service but it i
 s usually slow and thus we do not want to block and wait for the response, as 
we can do other important computation. So we can initiate an <a shape="rect" 
href="async.html">Async</a> exchange to the <a shape="rect" 
href="http.html">HTTP</a> endpoint and then do other stuff while the slow <a 
shape="rect" href="http.html">HTTP</a> service is processing our request. And 
then a bit later we can use the <strong><code>Future</code></strong> handle to 
get the response from the <a shape="rect" href="http.html">HTTP</a> service. 
Yeah nice so lets do it:</p><p>First we define some routes in Camel. One for 
the <a shape="rect" href="http.html">HTTP</a> service where we simulate a slow 
server as it takes at least 1 second to reply. And then other route that we 
want to invoke while the <a shape="rect" href="http.html">HTTP</a> service is 
on route. This allows you to be able to process the two routes 
simultaneously:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent 
 panelContent pdl">
+<div class="wiki-content maincontent"><h2 
id="Async-Async">Async</h2><p><strong>Available as of Camel 
2.0</strong></p><p>The asynchronous API in Camel have been rewritten for Camel 
2.0, and the information on this page applies for Camel 2.0 and 
later.</p><p>The <a shape="rect" href="async.html">Async</a> API in Camel is 
primarily divided in two areas:</p><ol><li>Initiating an <a shape="rect" 
href="async.html">Async</a> messaging from the client</li><li>Turning a route 
into <a shape="rect" href="async.html">Async</a> using the 
<strong>threads</strong> <a shape="rect" 
href="dsl.html">DSL</a></li></ol><p>Before we look at these two areas we start 
with a bit of background information and looks at the concept from at a higher 
level using diagrams. Then we check out the first area how a client can 
initiate an <a shape="rect" href="async.html">Async</a> message exchange and we 
also throw in the synchronous message exchange in the mix as well so we can 
compare and distill the difference. An
 d finally we turn our attention towards the last area the new 
<strong>threads</strong> DSL and what it can be used for.</p><h2 
id="Async-Background">Background</h2><p>The new <a shape="rect" 
href="async.html">Async</a> API in Camel 2.0 leverages in much greater detail 
the Java Concurrency API and its support for executing tasks asynchronous. 
Therefore the Camel <a shape="rect" href="async.html">Async</a> API should be 
familiar for users with knowledge of the Java Concurrency API.</p><h3 
id="Async-Afewconceptstomaster">A few concepts to master</h3><p>When doing 
messaging there are a few aspects to keep in mind. First of all a caller can 
initiate a message exchange as either:</p><ul class="alternate"><li><a 
shape="rect" href="event-message.html">Request only</a></li><li><a shape="rect" 
href="request-reply.html">Request Reply</a></li></ul><p><a shape="rect" 
href="event-message.html">Request only</a> is when the caller sends a message 
but do <strong>not</strong> expect any reply. This i
 s also known as fire and forget or event message. The <a shape="rect" 
href="request-reply.html">Request Reply</a> is when the caller sends a message 
and then <strong>waits for a reply</strong>. This is like the <a shape="rect" 
href="http.html">HTTP</a> protocol that we use every day when we surf the web. 
We send a request to fetch a web page and wait until the reply message comes 
with the web content.</p><p>In Camel a message is labeled with a Message <a 
shape="rect" href="exchange-pattern.html">Exchange Pattern</a> that labels 
whether its a request only or request reply message. Camel uses the <a 
shape="rect" href="jbi.html">JBI</a> term for this an uses 
<strong><code>InOnly</code></strong> for the request only, and 
<strong><code>InOut</code></strong> for the request reply.</p><p>For all 
message exchange they can be executed either:</p><ul 
class="alternate"><li>synchronous</li><li>asynchronous</li></ul><h4 
id="Async-SynchronousRequestReply">Synchronous Request Reply</h4><p>A synchr
 onous exchange is defined as the caller sends a message and waits until its 
complete before continuing.</p><p>This is illustrated in the diagram 
below:</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image" src="async.data/camel_sync_request_reply.png" 
data-image-src="/confluence/download/attachments/117116/camel_sync_request_reply.png?version=1&amp;modificationDate=1241917552000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="10641" 
data-linked-resource-version="1" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="camel_sync_request_reply.png" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="117116" 
data-linked-resource-container-version="56"></span></p><ol><li>The client sends 
a sync <a shape="rect" href="request-reply.html">Request Reply</a> message over 
<a shape="rect" href="http.html">HTTP</a> to Camel. The clie
 nt application will wait for the response that Camel routes and 
processes.</li><li>The message invokes an external <a shape="rect" 
href="mina.html">TCP</a> service using synchronous <a shape="rect" 
href="request-reply.html">Request Reply</a>. The client application still waits 
for the response.</li><li>The response is send back to the client.</li></ol><h4 
id="Async-AsynchronousRequestReply">Asynchronous Request Reply</h4><p>On the 
other hand the asynchronous version is where the caller sends a message to an 
<a shape="rect" href="endpoint.html">Endpoint</a> and then returns immediately 
back to the caller. The message however is processed in another thread, the 
asynchronous thread. Then the caller can continue doing other work and at the 
same time the asynchronous thread is processing the message.</p><p>This is 
illustrated in the diagram below:</p><p><span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" 
src="async.data/camel_async_request_reply.png" dat
 
a-image-src="/confluence/download/attachments/117116/camel_async_request_reply.png?version=2&amp;modificationDate=1241928088000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="10640" 
data-linked-resource-version="2" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="camel_async_request_reply.png" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="117116" 
data-linked-resource-container-version="56"></span></p><ol><li>The client sends 
an <a shape="rect" href="async.html">Async</a><a shape="rect" 
href="request-reply.html">Request Reply</a> message over <a shape="rect" 
href="http.html">HTTP</a> to Camel. The control is immediately returned to the 
client application, that can continue and do other work while Camel routes the 
message.</li><li>Camel invokes an external <a shape="rect" 
href="mina.html">TCP</a> service using synchronous <a shape="rect" href="reques
 t-reply.html">Request Reply</a>. The client application can do other work 
simultaneously.</li><li>The client wants to get the reply so it uses the Future 
handle it got as <em>response</em> from step 1. With this handle it retrieves 
the reply, wait if necessary if the reply is not 
ready.</li></ol><p>&#160;</p><h4 id="Async-SynchronousRequestOnly">Synchronous 
Request Only</h4><p>&#160;</p><p>You can also do synchronous <a shape="rect" 
href="event-message.html">Request only</a> with Camel. The client sends a 
message to Camel in which a reply is not expected. However the client still 
waits until the message is processed completely.</p><p>This is illustrated in 
the diagram below:</p><p><span class="confluence-embedded-file-wrapper"><img 
class="confluence-embedded-image" src="async.data/camel_sync_request_only.png" 
data-image-src="/confluence/download/attachments/117116/camel_sync_request_only.png?version=1&amp;modificationDate=1241923637000&amp;api=v2"
 data-unresolved-comment-count="0" d
 ata-linked-resource-id="10642" data-linked-resource-version="1" 
data-linked-resource-type="attachment" 
data-linked-resource-default-alias="camel_sync_request_only.png" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="117116" 
data-linked-resource-container-version="56"></span></p><ol><li>The client sends 
a <a shape="rect" href="event-message.html">Request only</a> and we can still 
use <a shape="rect" href="http.html">HTTP</a> despite http being <a 
shape="rect" href="request-reply.html">Request Reply</a> by 
nature.</li><li>Camel invokes an external <a shape="rect" 
href="mina.html">TCP</a> service using synchronous <a shape="rect" 
href="request-reply.html">Request Reply</a>. The client application is still 
waiting.</li><li>The message is processed completely and the control is 
returned to the client.</li></ol><p>So why do you want to use synchronous <a 
shape="rect" href="event-message.html">Request Only
 </a>? Well if you want to know whether the message was processed successfully 
or not before continuing. With synchronous it allows you to wait while the 
message is being processed. In case the processing was successful the control 
is returned to the client with no notion of error. In case of failure the 
client can detect this as an exception is thrown. (and 
<strong><code>exchange.isFailed()</code></strong> returns 
<strong><code>true</code>).</strong></p><h3 
id="Async-AsynchronousRequestOnly">Asynchronous Request Only</h3><p>As opposed 
to the synchronous <a shape="rect" href="event-message.html">Request Only</a> 
the <a shape="rect" href="async.html">Async</a> counter part will 
<strong>not</strong> wait for the processing of the message to complete. In 
this case the client can immediately continue doing other work while the 
message is being routed and processed in Camel.</p><p>This is illustrated in 
the diagram below:</p><p><span class="confluence-embedded-file-wrapper"><img 
class="co
 nfluence-embedded-image" src="async.data/camel_async_request_only.png" 
data-image-src="/confluence/download/attachments/117116/camel_async_request_only.png?version=1&amp;modificationDate=1241928107000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="10644" 
data-linked-resource-version="1" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="camel_async_request_only.png" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="117116" 
data-linked-resource-container-version="56"></span></p><ol><li>The client sends 
a <a shape="rect" href="event-message.html">Request only</a> and we can still 
use <a shape="rect" href="http.html">HTTP</a> despite HTTP being <a 
shape="rect" href="request-reply.html">Request Reply</a> by nature. The control 
is immediately returned to the client application, that can continue and do 
other work while Camel routes the message.</li><li>Camel 
 invokes an external <a shape="rect" href="mina.html">TCP</a> service using 
synchronous <a shape="rect" href="request-reply.html">Request Reply</a>. The 
client application can do other work simultaneously.</li><li>The message 
completes but no result is returned to the client.<br clear="none"><br 
clear="none"></li></ol><div class="confluence-information-macro 
confluence-information-macro-information"><span class="aui-icon aui-icon-small 
aui-iconfont-info confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p><strong>Note:</strong> As Camel 
always returns a <strong><code>Future</code></strong> handle for <a 
shape="rect" href="async.html">Async</a> messaging to the client. The client 
can use this handler to get hold of the status of the processing whether the 
task is complete or an Exception occurred during processing. Note that the 
client is not required to do so, its perfect valid to just ignore the Future 
handle.</p></div></div><div class="conflue
 nce-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>In case you want to know whether 
the <a shape="rect" href="async.html">Async</a> <a shape="rect" 
href="event-message.html">Request Only</a> failed, then you can use the 
<strong><code>Future</code></strong> handle and invoke 
<strong><code>get()</code></strong> and if it throws a 
<strong><code>ExecutionException</code></strong> then the processing failed. 
The caused exception is wrapped. You can invoke 
<strong><code>isDone()</code></strong> first to test whether the task is done 
or still in progress. Otherwise invoking <strong><code>get()</code></strong> 
will wait until the task is done.</p></div></div><p>With these diagrams in mind 
lets turn out attention to the <a shape="rect" href="async.html">Async</a> API 
and how to use it with Camel.</p><h2 id="Async-1)TheClientAPI">1) The <a 
 shape="rect" href="async.html">Async</a> Client API</h2><p>Camel provides the 
<a shape="rect" href="async.html">Async</a> Client API in the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ProducerTemplate.html";>ProducerTemplate</a>
 where we have added about ten new methods to Camel 2.0.</p><p>We have listed 
the most important in the table below:</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Method</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Returns</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>setExecutorService</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>void</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Is used to set the Java 
<strong><code>ExecutorService</code></strong>. C
 amel will by default provide 
a&#160;<strong><code>ScheduledExecutorService</code></strong> with 5 thread in 
the pool.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncSend</code></p></td><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Exchange&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Is used to send an async 
exchange to a Camel <a shape="rect" href="endpoint.html">Endpoint</a>. Camel 
will immediately return control to the caller thread after the task has been 
submitted to the executor service. This allows you to do other work while Camel 
processes the exchange in the other async thread.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncSendBody</code></p></td><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Object&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>As above but for sending body 
only. This is a request only messaging sty
 le so no reply is expected. Uses the <strong><code>InOnly</code></strong> 
exchange pattern.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncRequestBody</code></p></td><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Object&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>As above but for sending body 
only. This is a <a shape="rect" href="request-reply.html">Request Reply</a> 
messaging style so a reply is expected. Uses the 
<strong><code>InOut</code></strong> exchange pattern.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>extractFutureBody</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>T</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Is used to get the result from the 
asynchronous thread using the Java Concurrency Future 
handle.</p></td></tr></tbody></table></div><p>The 
<strong><code>asyncSend</code></strong> and <strong><code>asyncReques
 t</code></strong> methods return a Future handle. This handle is what the 
caller must use later to retrieve the asynchronous response. You can do this by 
using the <strong><code>extractFutureBody</code></strong> method, or just use 
plain Java but invoke <strong><code>get()</code></strong> on the 
<strong><code>Future</code></strong> handle.</p><h3 
id="Async-TheClientAPIwithcallbacks">The <a shape="rect" 
href="async.html">Async</a> Client API with callbacks</h3><p>In addition to the 
Client API from above Camel provides a variation that uses <a shape="rect" 
href="oncompletion.html">callbacks</a> when the message <a shape="rect" 
href="exchange.html">Exchange</a> is done.</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Method</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Returns</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="c
 onfluenceTd"><p><code>asyncCallback</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Exchange&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>In addition a callback is 
passed in as a parameter using the 
<strong><code>org.apache.camel.spi.Synchronization</code></strong> Callback. 
The callback is invoked when the message exchange is done.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncCallbackSendBody</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Future&lt;Object&gt;</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>As above but for sending body 
only. This is a request only messaging style so no reply is expected. Uses the 
<strong><code>InOnly</code></strong> exchange pattern.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>asyncCallbackRequestBody</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>Future
 &lt;Object&gt;</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>As above but for sending body only. This is a <a 
shape="rect" href="request-reply.html">Request Reply</a> messaging style so a 
reply is expected. Uses the <strong><code>InOut</code></strong> exchange 
pattern.</p></td></tr></tbody></table></div><p>These methods also returns 
the&#160;<strong><code>Future</code></strong> handle in case you need them. The 
difference is that they invokes the callback as well when the <a shape="rect" 
href="exchange.html">Exchange</a> is done being routed.</p><h4 
id="Async-TheFutureAPI">The Future API</h4><p>The 
<strong><code>java.util.concurrent.Future</code></strong> API have among others 
the following methods:</p><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Method</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Returns</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description
 </p></th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>isDone</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Returns a boolean whether the task is done 
or not. Will even return <strong><code>true</code></strong> if the tasks failed 
due to an exception thrown.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>get()</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Gets the response of the task. In case of an exception 
was thrown the 
<strong><code>java.util.concurrent.ExecutionException</code></strong> is thrown 
with the caused exception.</p></td></tr></tbody></table></div><h3 
id="Async-Example:AsynchronousRequestReply">Example: Asynchronous Request 
Reply</h3><p>Suppose we want to call a <a shape="rect" 
href="http.html">HTTP</a> service but it i
 s usually slow and thus we do not want to block and wait for the response, as 
we can do other important computation. So we can initiate an <a shape="rect" 
href="async.html">Async</a> exchange to the <a shape="rect" 
href="http.html">HTTP</a> endpoint and then do other stuff while the slow <a 
shape="rect" href="http.html">HTTP</a> service is processing our request. And 
then a bit later we can use the <strong><code>Future</code></strong> handle to 
get the response from the <a shape="rect" href="http.html">HTTP</a> service. 
Yeah nice so lets do it:</p><p>First we define some routes in Camel. One for 
the <a shape="rect" href="http.html">HTTP</a> service where we simulate a slow 
server as it takes at least 1 second to reply. And then other route that we 
want to invoke while the <a shape="rect" href="http.html">HTTP</a> service is 
on route. This allows you to be able to process the two routes 
simultaneously:</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[
 // The mocks are here for unit test
 

Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Sun Jul  9 
22:38:25 2017
@@ -1011,11 +1011,11 @@ template.send(&quot;direct:alias-verify&
 ]]></script>
 </div></div><p></p><h3 id="BookComponentAppendix-SeeAlso.8">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="BookComponentAppendix-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 cons
 ume 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.rbtoc1499368847587 {padding: 0px;}
-div.rbtoc1499368847587 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1499368847587 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1499639814540 {padding: 0px;}
+div.rbtoc1499639814540 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499639814540 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1499368847587">
+/*]]>*/</style></p><div class="toc-macro rbtoc1499639814540">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookComponentAppendix-CXFComponent">CXF Component</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookComponentAppendix-URIformat">URI format</a></li><li><a shape="rect" 
href="#BookComponentAppendix-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookComponentAppendix-Thedescriptionsofthedataformats">The descriptions 
of the dataformats</a>
@@ -2669,7 +2669,7 @@ protected RouteBuilder createRouteBuilde
 
             // this is the file route that pickup files, notice how we use our 
custom exception handler on the consumer
             // the exclusiveReadLockStrategy is only configured because this 
is from an unit test, so we use that to simulate exceptions
-            
from(&quot;file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&amp;consumer.exceptionHandler=#myExceptionHandler&quot;)
+            
from(&quot;file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&amp;consumer.exceptionHandler=#myExceptionHandler&amp;initialDelay=0&amp;delay=10&quot;)
                 .convertBodyTo(String.class)
                 .to(&quot;mock:result&quot;);
         }
@@ -2692,7 +2692,7 @@ protected RouteBuilder createRouteBuilde
 
             // this is the file route that pickup files, notice how we bridge 
the consumer to use the Camel routing error handler
             // the exclusiveReadLockStrategy is only configured because this 
is from an unit test, so we use that to simulate exceptions
-            
from(&quot;file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&amp;consumer.bridgeErrorHandler=true&quot;)
+            
from(&quot;file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&amp;consumer.bridgeErrorHandler=true&amp;initialDelay=0&amp;delay=10&quot;)
                 .convertBodyTo(String.class)
                 .to(&quot;mock:result&quot;);
         }

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 Sun Jul  9 22:38:25 
2017
@@ -3545,11 +3545,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.rbtoc1499368783879 {padding: 0px;}
-div.rbtoc1499368783879 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1499368783879 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1499639822106 {padding: 0px;}
+div.rbtoc1499639822106 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499639822106 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1499368783879">
+/*]]>*/</style></p><div class="toc-macro rbtoc1499639822106">
 <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>
@@ -3825,7 +3825,7 @@ public static void main(final String[] a
 DefaultInstrumentationAgent    INFO  JMX connector thread started on 
service:jmx:rmi:///jndi/rmi://claus-acer:1099/jmxrmi/camel
 ...
 ]]></script>
-</div></div><p>In the screenshot below we can see the route and its 
performance metrics:<br clear="none"> <span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" 
src="book-in-one-page.data/jconsole_jms_tutorial.PNG" 
data-image-src="/confluence/download/attachments/82923/jconsole_jms_tutorial.PNG?version=1&amp;modificationDate=1214345078000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="59672517" 
data-linked-resource-version="1" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="jconsole_jms_tutorial.PNG" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="82923" 
data-linked-resource-container-version="41"></span></p><h2 
id="BookInOnePage-SeeAlso.5">See Also</h2><ul><li><a shape="rect" 
class="external-link" href="http://aminsblog.wordpress.com/2008/05/06/15/"; 
rel="nofollow">Spring Remoting with JMS Example</a> on <a shape="rect
 " class="external-link" href="http://aminsblog.wordpress.com/"; 
rel="nofollow">Amin Abbaspour's Weblog</a></li></ul>
+</div></div><p>In the screenshot below we can see the route and its 
performance metrics:<br clear="none"> <span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" 
src="book-in-one-page.data/jconsole_jms_tutorial.PNG" 
data-image-src="/confluence/download/attachments/82923/jconsole_jms_tutorial.PNG?version=1&amp;modificationDate=1214345078000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="59672517" 
data-linked-resource-version="1" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="jconsole_jms_tutorial.PNG" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="82923" 
data-linked-resource-container-version="42"></span></p><h2 
id="BookInOnePage-SeeAlso.5">See Also</h2><ul><li><a shape="rect" 
class="external-link" href="http://aminsblog.wordpress.com/2008/05/06/15/"; 
rel="nofollow">Spring Remoting with JMS Example</a> on <a shape="rect
 " class="external-link" href="http://aminsblog.wordpress.com/"; 
rel="nofollow">Amin Abbaspour's Weblog</a></li></ul>
 
 <h2 id="BookInOnePage-Tutorial-camel-example-reportincident">Tutorial - 
camel-example-reportincident</h2>
 
@@ -5664,11 +5664,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.rbtoc1499368784652 {padding: 0px;}
-div.rbtoc1499368784652 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1499368784652 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1499639822224 {padding: 0px;}
+div.rbtoc1499639822224 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499639822224 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1499368784652">
+/*]]>*/</style><div class="toc-macro rbtoc1499639822224">
 <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>
@@ -13354,7 +13354,7 @@ from(&quot;jms:queue:foo&quot;)
 </div></div>Notice this is <strong>only</strong> possible in the 
<code>batch</code> mode of the <a shape="rect" 
href="resequencer.html">Resequencer</a>.<h4 
id="BookInOnePage-Ignoreinvalidexchanges">Ignore invalid 
exchanges</h4><p><strong>Available as of Camel 2.9</strong></p><p>The <a 
shape="rect" href="resequencer.html">Resequencer</a> EIP will from Camel 2.9 
onwards throw a <code>CamelExchangeException</code> if the incoming <a 
shape="rect" href="exchange.html">Exchange</a> is not valid for the resequencer 
- ie. the expression cannot be evaluated, such as a missing header. You can use 
the option <code>ignoreInvalidExchanges</code> to ignore these exceptions which 
means the <a shape="rect" href="resequencer.html">Resequencer</a> will then 
skip the invalid <a shape="rect" href="exchange.html">Exchange</a>.</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;)
-    .resequence(header(&quot;seqno&quot;)).batch().timeout(1000)
+    .resequence(header(&quot;seqno&quot;)).batch().timeout(250)
         // ignore invalid exchanges (they are discarded)
         .ignoreInvalidExchanges()
     .to(&quot;mock:result&quot;);
@@ -13824,7 +13824,7 @@ from(&quot;direct:c&quot;).routingSlip(h
 
 <h3 id="BookInOnePage-Examples.10">Examples</h3><p><strong>Using the <a 
shape="rect" href="fluent-builders.html">Fluent Builders</a></strong></p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;seda:a&quot;).throttle(3).timePeriodMillis(10000).to(&quot;log:result&quot;,
 &quot;mock:result&quot;);
+from(&quot;seda:a&quot;).throttle(3).timePeriodMillis(1000).to(&quot;log:result&quot;,
 &quot;mock:result&quot;);
 ]]></script>
 </div></div><p>So the above example will throttle messages all messages 
received on <strong>seda:a</strong> before being sent to 
<strong>mock:result</strong> ensuring that a maximum of 3 messages are sent in 
any 10 second window.</p><p>Note that since <code>timePeriodMillis</code> 
defaults to 1000 milliseconds, just setting the 
<code>maximumRequestsPerPeriod</code> has the effect of setting the maximum 
number of requests per second. So to throttle requests at 100 requests per 
second between two endpoints, it would look more like this...</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;seda:a&quot;).throttle(100).to(&quot;seda:b&quot;);
@@ -13842,8 +13842,8 @@ from(&quot;seda:a&quot;).throttle(3).tim
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;route&gt;
   &lt;from uri=&quot;seda:a&quot;/&gt;
-  &lt;!-- throttle 3 messages per 10 sec --&gt;
-  &lt;throttle timePeriodMillis=&quot;10000&quot;&gt;
+  &lt;!-- throttle 3 messages per 1 sec --&gt;
+  &lt;throttle timePeriodMillis=&quot;1000&quot;&gt;
     &lt;constant&gt;3&lt;/constant&gt;
     &lt;to uri=&quot;log:result&quot;/&gt;
     &lt;to uri=&quot;mock:result&quot;/&gt;
@@ -16871,11 +16871,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.rbtoc1499368788735 {padding: 0px;}
-div.rbtoc1499368788735 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1499368788735 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1499639823065 {padding: 0px;}
+div.rbtoc1499639823065 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499639823065 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1499368788735">
+/*]]>*/</style></p><div class="toc-macro rbtoc1499639823065">
 <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>
@@ -18529,7 +18529,7 @@ protected RouteBuilder createRouteBuilde
 
             // this is the file route that pickup files, notice how we use our 
custom exception handler on the consumer
             // the exclusiveReadLockStrategy is only configured because this 
is from an unit test, so we use that to simulate exceptions
-            
from(&quot;file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&amp;consumer.exceptionHandler=#myExceptionHandler&quot;)
+            
from(&quot;file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&amp;consumer.exceptionHandler=#myExceptionHandler&amp;initialDelay=0&amp;delay=10&quot;)
                 .convertBodyTo(String.class)
                 .to(&quot;mock:result&quot;);
         }
@@ -18552,7 +18552,7 @@ protected RouteBuilder createRouteBuilde
 
             // this is the file route that pickup files, notice how we bridge 
the consumer to use the Camel routing error handler
             // the exclusiveReadLockStrategy is only configured because this 
is from an unit test, so we use that to simulate exceptions
-            
from(&quot;file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&amp;consumer.bridgeErrorHandler=true&quot;)
+            
from(&quot;file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&amp;consumer.bridgeErrorHandler=true&amp;initialDelay=0&amp;delay=10&quot;)
                 .convertBodyTo(String.class)
                 .to(&quot;mock:result&quot;);
         }

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 Sun Jul  9 
22:38:25 2017
@@ -2112,7 +2112,7 @@ from(&quot;jms:queue:foo&quot;)
 </div></div>Notice this is <strong>only</strong> possible in the 
<code>batch</code> mode of the <a shape="rect" 
href="resequencer.html">Resequencer</a>.<h4 
id="BookPatternAppendix-Ignoreinvalidexchanges">Ignore invalid 
exchanges</h4><p><strong>Available as of Camel 2.9</strong></p><p>The <a 
shape="rect" href="resequencer.html">Resequencer</a> EIP will from Camel 2.9 
onwards throw a <code>CamelExchangeException</code> if the incoming <a 
shape="rect" href="exchange.html">Exchange</a> is not valid for the resequencer 
- ie. the expression cannot be evaluated, such as a missing header. You can use 
the option <code>ignoreInvalidExchanges</code> to ignore these exceptions which 
means the <a shape="rect" href="resequencer.html">Resequencer</a> will then 
skip the invalid <a shape="rect" href="exchange.html">Exchange</a>.</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;)
-    .resequence(header(&quot;seqno&quot;)).batch().timeout(1000)
+    .resequence(header(&quot;seqno&quot;)).batch().timeout(250)
         // ignore invalid exchanges (they are discarded)
         .ignoreInvalidExchanges()
     .to(&quot;mock:result&quot;);
@@ -2582,7 +2582,7 @@ from(&quot;direct:c&quot;).routingSlip(h
 
 <h3 id="BookPatternAppendix-Examples.2">Examples</h3><p><strong>Using the <a 
shape="rect" href="fluent-builders.html">Fluent Builders</a></strong></p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
-from(&quot;seda:a&quot;).throttle(3).timePeriodMillis(10000).to(&quot;log:result&quot;,
 &quot;mock:result&quot;);
+from(&quot;seda:a&quot;).throttle(3).timePeriodMillis(1000).to(&quot;log:result&quot;,
 &quot;mock:result&quot;);
 ]]></script>
 </div></div><p>So the above example will throttle messages all messages 
received on <strong>seda:a</strong> before being sent to 
<strong>mock:result</strong> ensuring that a maximum of 3 messages are sent in 
any 10 second window.</p><p>Note that since <code>timePeriodMillis</code> 
defaults to 1000 milliseconds, just setting the 
<code>maximumRequestsPerPeriod</code> has the effect of setting the maximum 
number of requests per second. So to throttle requests at 100 requests per 
second between two endpoints, it would look more like this...</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;seda:a&quot;).throttle(100).to(&quot;seda:b&quot;);
@@ -2600,8 +2600,8 @@ from(&quot;seda:a&quot;).throttle(3).tim
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[
 &lt;route&gt;
   &lt;from uri=&quot;seda:a&quot;/&gt;
-  &lt;!-- throttle 3 messages per 10 sec --&gt;
-  &lt;throttle timePeriodMillis=&quot;10000&quot;&gt;
+  &lt;!-- throttle 3 messages per 1 sec --&gt;
+  &lt;throttle timePeriodMillis=&quot;1000&quot;&gt;
     &lt;constant&gt;3&lt;/constant&gt;
     &lt;to uri=&quot;log:result&quot;/&gt;
     &lt;to uri=&quot;mock:result&quot;/&gt;

Modified: websites/production/camel/content/book-tutorials.html
==============================================================================
--- websites/production/camel/content/book-tutorials.html (original)
+++ websites/production/camel/content/book-tutorials.html Sun Jul  9 22:38:25 
2017
@@ -146,11 +146,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="BookTutorials-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="BookTutorials-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.rbtoc1499368952472 {padding: 0px;}
-div.rbtoc1499368952472 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1499368952472 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1499639819264 {padding: 0px;}
+div.rbtoc1499639819264 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499639819264 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1499368952472">
+/*]]>*/</style></p><div class="toc-macro rbtoc1499639819264">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookTutorials-TutorialonSpringRemotingwithJMS">Tutorial on Spring 
Remoting with JMS</a></li><li><a shape="rect" 
href="#BookTutorials-Preface">Preface</a></li><li><a shape="rect" 
href="#BookTutorials-Prerequisites">Prerequisites</a></li><li><a shape="rect" 
href="#BookTutorials-Distribution">Distribution</a></li><li><a shape="rect" 
href="#BookTutorials-About">About</a></li><li><a shape="rect" 
href="#BookTutorials-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookTutorials-UpdatethePOMwithDependencies">Update the POM with 
Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#BookTutorials-WritingtheServer">Writing the 
Server</a>
@@ -426,7 +426,7 @@ public static void main(final String[] a
 DefaultInstrumentationAgent    INFO  JMX connector thread started on 
service:jmx:rmi:///jndi/rmi://claus-acer:1099/jmxrmi/camel
 ...
 ]]></script>
-</div></div><p>In the screenshot below we can see the route and its 
performance metrics:<br clear="none"> <span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" 
src="book-tutorials.data/jconsole_jms_tutorial.PNG" 
data-image-src="/confluence/download/attachments/82923/jconsole_jms_tutorial.PNG?version=1&amp;modificationDate=1214345078000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="59672517" 
data-linked-resource-version="1" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="jconsole_jms_tutorial.PNG" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="82923" 
data-linked-resource-container-version="41"></span></p><h2 
id="BookTutorials-SeeAlso">See Also</h2><ul><li><a shape="rect" 
class="external-link" href="http://aminsblog.wordpress.com/2008/05/06/15/"; 
rel="nofollow">Spring Remoting with JMS Example</a> on <a shape="rect" cl
 ass="external-link" href="http://aminsblog.wordpress.com/"; rel="nofollow">Amin 
Abbaspour's Weblog</a></li></ul>
+</div></div><p>In the screenshot below we can see the route and its 
performance metrics:<br clear="none"> <span 
class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" 
src="book-tutorials.data/jconsole_jms_tutorial.PNG" 
data-image-src="/confluence/download/attachments/82923/jconsole_jms_tutorial.PNG?version=1&amp;modificationDate=1214345078000&amp;api=v2"
 data-unresolved-comment-count="0" data-linked-resource-id="59672517" 
data-linked-resource-version="1" data-linked-resource-type="attachment" 
data-linked-resource-default-alias="jconsole_jms_tutorial.PNG" 
data-base-url="https://cwiki.apache.org/confluence"; 
data-linked-resource-content-type="image/png" 
data-linked-resource-container-id="82923" 
data-linked-resource-container-version="42"></span></p><h2 
id="BookTutorials-SeeAlso">See Also</h2><ul><li><a shape="rect" 
class="external-link" href="http://aminsblog.wordpress.com/2008/05/06/15/"; 
rel="nofollow">Spring Remoting with JMS Example</a> on <a shape="rect" cl
 ass="external-link" href="http://aminsblog.wordpress.com/"; rel="nofollow">Amin 
Abbaspour's Weblog</a></li></ul>
 
 <h2 id="BookTutorials-Tutorial-camel-example-reportincident">Tutorial - 
camel-example-reportincident</h2>
 
@@ -2265,11 +2265,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.rbtoc1499368952680 {padding: 0px;}
-div.rbtoc1499368952680 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1499368952680 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1499639819444 {padding: 0px;}
+div.rbtoc1499639819444 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499639819444 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1499368952680">
+/*]]>*/</style><div class="toc-macro rbtoc1499639819444">
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookTutorials-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 
1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookTutorials-Prerequisites">Prerequisites</a></li><li><a shape="rect" 
href="#BookTutorials-Distribution">Distribution</a></li><li><a shape="rect" 
href="#BookTutorials-Introduction">Introduction</a></li><li><a shape="rect" 
href="#BookTutorials-SettinguptheprojecttorunAxis">Setting up the project to 
run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" 
href="#BookTutorials-Maven2">Maven 2</a></li><li><a shape="rect" 
href="#BookTutorials-wsdl">wsdl</a></li><li><a shape="rect" 
href="#BookTutorials-ConfiguringAxis">Configuring Axis</a></li><li><a 
shape="rect" href="#BookTutorials-RunningtheExample">Running the 
Example</a></li></ul>

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


Reply via email to