Author: buildbot
Date: Wed Sep 13 00:57:19 2017
New Revision: 1018085

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-component-appendix.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/properties.html

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 Wed Sep 13 
00:57:19 2017
@@ -200,17 +200,17 @@ droppable = false
   <version>5.6.0</version>
 </dependency>
 </plain-text-body><p><parameter ac:name=""><a shape="rect" 
href="endpoint-see-also.html">Endpoint See Also</a></parameter></p> <div 
class="error"><span class="error">Unable to render {include}</span> The 
included page could not be found.</div> <h2 
id="BookComponentAppendix-AMQP">AMQP</h2><p>The <strong style="line-height: 
1.42857;">amqp:</strong> component supports the <a shape="rect" 
class="external-link" href="http://www.amqp.org/"; rel="nofollow" 
style="line-height: 1.42857;">AMQP 1.0 protocol</a> using the JMS Client API of 
the <a shape="rect" class="external-link" 
href="https://github.com/apache/qpid-jms/"; rel="nofollow">Qpid</a> project. In 
case you want to use <strong>AMQP 0.9</strong> (in particular RabbitMQ) you 
might also be interested in the <a shape="rect" href="rabbitmq.html">Camel 
RabbitMQ</a> component. Please keep in mind that prior to the <strong>Camel 
2.17.0</strong> AMQP component supported <strong>AMQP 0.9</strong> and above, 
however since <strong>Camel 2.17.0</st
 rong> it supports only <strong>AMQP 1.0</strong>.</p><p>Maven users will need 
to add the following dependency to their <strong><code>pom.xml</code></strong> 
for this component:</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;dependency&gt;
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-amqp&lt;/artifactId&gt;
     &lt;version&gt;${camel.version}&lt;/version&gt; &lt;!-- use the same 
version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
 </div></div><h3 id="BookComponentAppendix-URIformat.1">URI format</h3><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[amqp:[queue:|topic:]destinationName[?options]
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[amqp:[queue:|topic:]destinationName[?options]
 ]]></script>
 </div></div><h3 id="BookComponentAppendix-AMQPOptions">AMQP Options</h3><p>You 
can specify all of the various configuration options of the <a shape="rect" 
href="jms.html">JMS</a> component after the destination name.</p><h3 
id="BookComponentAppendix-Usage">Usage</h3><p>As AMQP component inherits from 
the JMS component. The usage of the former is almost identical to the 
latter:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Using 
AMQP component</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[// Consuming from AMQP queue
+<script class="brush: java; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[// Consuming from AMQP queue
 from(&quot;amqp:queue:incoming&quot;)
   .to(...);
  
@@ -218,13 +218,13 @@ from(&quot;amqp:queue:incoming&quot;)
 from(...)
   .to(&quot;amqp:topic:notify&quot;);]]></script>
 </div></div><h3 id="BookComponentAppendix-ConfiguringAMQPcomponent"><span 
style="line-height: 1.5;">Configuring AMQP component</span></h3><p>Starting 
from the <strong>Camel 2.16.1</strong> you can also use the 
<strong><code>AMQPComponent#amqp10Component(String 
connectionURI)</code></strong> factory method to return the <strong>AMQP 
1.0</strong> component with the pre-configured&#160;topic prefix:&#160;</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 1px;"><b>Creating AMQP 1.0 
component</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[ AMQPComponent amqp = 
AMQPComponent.amqp10Component(&quot;amqp://guest:guest@localhost:5672&quot;);]]></script>
+<script class="brush: java; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[ AMQPComponent amqp = 
AMQPComponent.amqp10Component(&quot;amqp://guest:guest@localhost:5672&quot;);]]></script>
 </div></div><p>Keep in mind that starting from the 
<strong>Camel&#160;2.17</strong>&#160;the&#160;<strong><code>AMQPComponent#amqp10Component(String
 connectionURI)</code></strong>&#160;factory method has been deprecated on the 
behalf of the <strong><code>AMQPComponent#amqpComponent(String 
connectionURI)</code></strong>:&#160;</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>Creating AMQP 1.0 component</b></div><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[AMQPComponent amqp = 
AMQPComponent.amqpComponent(&quot;amqp://localhost:5672&quot;);
+<script class="brush: java; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[AMQPComponent amqp = 
AMQPComponent.amqpComponent(&quot;amqp://localhost:5672&quot;);
  
 AMQPComponent authorizedAmqp = 
AMQPComponent.amqpComponent(&quot;amqp://localhost:5672&quot;, 
&quot;user&quot;, &quot;password&quot;);]]></script>
 </div></div><p>Starting from <strong>Camel 2.17</strong>, in order to 
automatically configure the AMQP component, you can also add an instance 
of&#160;<strong><code>org.apache.camel.component.amqp.AMQPConnectionDetails</code></strong>
 to the registry. For example for Spring Boot you just have to 
define&#160;bean:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 
1px;"><b>AMQP connection details auto-configuration</b></div><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[@Bean
+<script class="brush: java; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[@Bean
 AMQPConnectionDetails amqpConnection() {
   return new AMQPConnectionDetails(&quot;amqp://lcoalhost:5672&quot;); 
 }
@@ -234,7 +234,7 @@ AMQPConnectionDetails securedAmqpConnect
   return new AMQPConnectionDetails(&quot;amqp://lcoalhost:5672&quot;, 
&quot;username&quot;, &quot;password&quot;); 
 }]]></script>
 </div></div><p>&#160;</p><p>You can also rely on the <a shape="rect" 
href="properties.html">Camel properties</a> to read the AMQP connection 
details. The factory 
method&#160;<strong><code>AMQPConnectionDetails.discoverAMQP()</code></strong>&#160;attempts
 to read Camel properties in a Kubernetes-like convention, just as demonstrated 
on the snippet below:</p><p>&#160;</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>AMQP connection details 
auto-configuration</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[export AMQP_SERVICE_HOST = 
&quot;mybroker.com&quot;
+<script class="brush: java; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[export AMQP_SERVICE_HOST = 
&quot;mybroker.com&quot;
 export AMQP_SERVICE_PORT = &quot;6666&quot;
 export AMQP_SERVICE_USERNAME = &quot;username&quot;
 export AMQP_SERVICE_PASSWORD = &quot;password&quot;
@@ -247,7 +247,7 @@ AMQPConnectionDetails amqpConnection() {
 }
 ]]></script>
 </div></div><h3 
id="BookComponentAppendix-ConfiguringConnectionFactory">Configuring Connection 
Factory</h3><p>Like with any other JMS-based component, usually it's important 
to configure JMS connection factory. For example, you'd like to set your broker 
URL or set proper connection credentials. Additionally, you would always want 
to set some kind of pooling (or caching) on the connection factory. An example 
of how to do both of these tasks is shown below.</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;bean id=&quot;jmsConnectionFactory&quot; 
class=&quot;org.apache.qpid.jms.JmsConnectionFactory&quot;&gt;
+<script class="brush: xml; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[&lt;bean id=&quot;jmsConnectionFactory&quot; 
class=&quot;org.apache.qpid.jms.JmsConnectionFactory&quot;&gt;
   &lt;property name=&quot;remoteURI&quot; 
value=&quot;amqp://localhost:5672&quot; /&gt;
   &lt;property name=&quot;username&quot; value=&quot;admin&quot;/&gt;
   &lt;property name=&quot;password&quot; value=&quot;admin&quot;/&gt;
@@ -278,15 +278,15 @@ AMQPConnectionDetails amqpConnection() {
 
 ]]></script>
 </div></div><h3 id="BookComponentAppendix-UsingamqpinsideKaraf">Using amqp 
inside Karaf</h3><p>To use the <strong><code>amqp</code></strong> component 
inside Karaf use the predefined feature called 
<strong><code>camel-amqp</code></strong> to install the necessary 
bundles.</p><p>Example:</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
-<script class="brush: text; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[karaf@root()&gt; repo-add camel
+<script class="brush: text; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[karaf@root()&gt; repo-add camel
 karaf@root()&gt; feature:install camel-amqp]]></script>
 </div></div><p>and the environment would be set.</p><p>Use the 
<strong><code>camel-blueprint</code></strong> 
or&#160;<strong><code>camel-spring</code></strong> features to define routes in 
those contexts.</p><p>&#160;</p><p></p><h3 
id="BookComponentAppendix-SeeAlso">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><p>&#160;</p> <h2 
id="BookComponentAppendix-SQSComponent">SQS Component</h2><p><strong>Available 
as of Camel 2.6</strong></p><p>The sqs component supports sending and receiving 
messages to <a shape="rect" class="external-link" 
href="http://aws.amazon.com/sqs"; rel="nofollow">Amazon's SQS</a> 
service.</p><div class="confluence-information-macro 
confluence-information-macro-information"><p 
class="title">Prerequisites</p><span class="aui-icon aui-icon-small 
aui-iconfont-info confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>You must have a valid Amazon Web 
Services developer account, and be signed up to use Amazon SQS. More 
information are available at <a shape="rect" class="
 external-link" href="http://aws.amazon.com/sqs"; rel="nofollow">Amazon 
SQS</a>.</p></div></div><h3 id="BookComponentAppendix-URIFormat">URI 
Format</h3><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[aws-sqs://queueName[?options]
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[aws-sqs://queueName[?options]
 aws-sqs://queueNameOrArn[?options] (from Camel 2.18)
 ]]></script>
 </div></div><p>The queue will be created if they don't already exists. You can 
append query options to the URI in the following format: 
<strong><code>?options=value&amp;option2=value&amp;...</code></strong></p><h3 
id="BookComponentAppendix-URIOptions">URI Options</h3><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>Context</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>accessKey</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>Shared</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Amazon AWS Access 
Key.</p></td></tr><tr><td colspan="1" rowspan="1" class="conflue
 nceTd"><p><code>amazonSQSClient</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Shared</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Reference to a 
<strong><code>com.amazonaws.services.sqs.AmazonSQS</code></strong> in the <a 
shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>amazonSQSEndpoint</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>Shared</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The region with which 
the&#160;<strong><code>aws-sqs</code></strong> client wants to work with. Only 
works if Camel creates the&#160;<strong><code>aws-sqs</code></strong> client, 
i.e., if you explicitly set <strong><code>amazonSQSClient</code></strong>, then 
this setting will have 
 no effect. You would have to set it on the client you create 
directly</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>attributeNames</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>Consumer</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>A list of attribute names to 
receive when consuming. </p><p><strong>Camel 2.17:</strong> Multiple names can 
be separated by comma. </p><p><strong>Camel 2.16</strong> or older: The type is 
a Collection so its much harder to configure and use.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>concurrentConsumers</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><code>1</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>Consumer</code></td><td colspan="1" 
rowspan="1" class="confluenceTd">(<strong>as of 2.15.0</strong>) Allows you to 
use multiple threads
  to poll the SQS queue to increase throughput. You must also set t<span>he 
</span><strong><code>maxMessagesPerPoll</code></strong> option for this to work 
properly.</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>defaultVisibilityTimeout</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>Shared</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The visibility timeout (in 
seconds) to set in the 
<strong><code>com.amazonaws.services.sqs.model.CreateQueueRequest</code></strong>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>delaySeconds</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>Producer</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.3:</strong> 
Delay sending messages for a numb
 er of seconds.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>deleteAfterRead</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>Consumer</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Delete message from SQS after 
it has been read (and processed by the route).</p><p>If this option is false, 
then the same objects will be retrieve over and over again on the polls. 
Therefore you need to use the <a shape="rect" 
href="idempotent-consumer.html">Idempotent Consumer EIP</a> in the route to 
filter out duplicates. You can filter using 
the&#160;<strong><code>S3Constants#BUCKET_NAME</code></strong> 
and&#160;<strong><code>S3Constants#KEY</code></strong> headers, or only 
the&#160;<strong><code>S3Constants#KEY</code></strong> 
header.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>deleteIfFiltered</code></p></td><td colspan=
 "1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Consumer</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.12.2, 2.13.0</strong>: 
Whether or not to send the&#160;<strong><code>DeleteMessage</code></strong> to 
the SQS queue if an exchange fails to get through a 
filter.</p><p>If&#160;<strong><code>false</code></strong> and exchange does not 
make it through a Camel filter upstream in the route, then don't send 
<strong><code>DeleteMessage</code></strong>.</p></td></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>extendMessageVisibility</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Consumer</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> If enabled a 
scheduled background task will keep extending the message visib
 ility on SQS. This is needed if it takes a long time to process the message. 
If set to true<strong><code> visibilityTimeout</code></strong> must be 
set.</p><p>See details at <a shape="rect" class="external-link" 
href="http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/Query_QueryChangeMessageVisibility.html";
 rel="nofollow">Amazon docs</a>.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>maximumMessageSize</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>Shared</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> 
The&#160;<strong><code>maximumMessageSize</code></strong> (in bytes) an SQS 
message can contain for this queue, to set in the 
<strong><code>com.amazonaws.services.sqs.model.SetQueueAttributesRequest</code></strong>.</p></td></tr><tr><td
 colspan="1" rowspan="1" class="confluenceTd"><
 p><code>maxMessagesPerPoll</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Consumer</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The maximum number of messages which can be 
received in one poll to set in the 
<strong><code>com.amazonaws.services.sqs.model.ReceiveMessageRequest</code></strong>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><code>messageAttributeNames</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>null</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>Consumer</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>A list of message attribute names to 
receive when consuming. </p><p><strong>Camel 
2.17:</strong><span>&#160;</span>Multiple names can be separated by comma. 
<span>&#160;</span></p><p><span><strong>Camel 2.16</strong> or older: The type 
is a Collection so its much harder to c
 onfigure and use.</span></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>messageRetentionPeriod</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>Shared</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> 
The&#160;<strong><code>messageRetentionPeriod</code></strong> (in seconds) a 
message will be retained by SQS for this queue, to set in the 
<strong><code>com.amazonaws.services.sqs.model.SetQueueAttributesRequest</code></strong>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>proxyHost</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>null</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><code>Shared</code></td><td colspan="1" 
rowspan="1" class="confluenceTd"><strong>Camel 2.16</strong>: Specify a proxy 
host to be used inside the client definition.</td></tr
 ><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>proxyPort</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><code>null</code></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><code>Shared</code></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><strong>Camel 2.16</strong>: Specify a proxy 
 >port to be used inside the client definition.</td></tr><tr><td colspan="1" 
 >rowspan="1" 
 >class="confluenceTd"><p><code>queueOwnerAWSAccountId</code></p></td><td 
 >colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
 >colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>Shared</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> Specify the 
 >queue owner aws account id when you need to connect the queue with different 
 >account owner.</p></td></tr><tr><td colspan="1" rowspan="1" 
 >class="confluenceTd"><p><code>policy</code></p></td><td colspan="1" 
 >rowspan="1" class="confluenceTd"><p><code>null</code></p></t
 d><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Shared</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.8:</strong> The policy for this queue 
to set in the 
<strong><code>com.amazonaws.services.sqs.model.SetQueueAttributesRequest</code></strong>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>receiveMessageWaitTimeSeconds</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>Shared</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> If 
you do not specify&#160;<strong><code>WaitTimeSeconds</code></strong> in the 
request, the queue 
attribute&#160;<strong><code>ReceiveMessageWaitTimeSeconds</code></strong> is 
used to determine how long to wait.</p></td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>redrivePolicy</code></p></td><td 
colspan="1" rowspan="1" clas
 s="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><code>Shared</code></td><td colspan="1" rowspan="1" 
class="confluenceTd"><strong>Camel 2.15</strong>: Specify the policy that send 
message to&#160;<strong><code>DeadLetter</code></strong> queue. See detail at 
<a shape="rect" class="external-link" 
href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues-redrivepolicy.html";
 rel="nofollow">Amazon docs</a>.</td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>region</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Shared</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.12.3:</strong> Specify the queue region 
which could be used with <strong><code>queueOwnerAWSAccountId</code></strong> 
to build the service URL.<br clear="none"><strong>Note</strong>: Region will st
 ill default to&#160;<strong><code>us-east-1</code></strong> if 
&#160;<span><strong><code>queueOwnerAWSAccountId</code></strong> is not 
specified</span></p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>secretKey</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>Shared</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Amazon AWS Secret Key.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>waitTimeSeconds</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>Producer</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> 
Duration in seconds (0 to 20) that 
the&#160;<strong><code>ReceiveMessage</code></strong> action call will wait 
until a message is in the queue to include in the respons
 e.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>visibilityTimeout</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>Shared</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The duration (in seconds) that the received 
messages are hidden from subsequent retrieve requests after being retrieved by 
a&#160;<strong><code>ReceiveMessage</code></strong> request. This only make 
sense if its different from 
<strong><code>defaultVisibilityTimeout</code></strong>.</p></td></tr></tbody></table></div><div
 class="confluence-information-macro 
confluence-information-macro-information"><p class="title">Required SQS 
component options</p><span class="aui-icon aui-icon-small aui-iconfont-info 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>You have to provide 
the&#160;<strong><code>amazonSQSClient</code></strong> in
  the <a shape="rect" href="registry.html">Registry</a> or 
your&#160;<strong><code>accessKey</code></strong> 
and&#160;<strong><code>secretKey</code></strong> to access the <a shape="rect" 
class="external-link" href="http://aws.amazon.com/sqs"; rel="nofollow">Amazon's 
SQS</a>.</p></div></div><h3 id="BookComponentAppendix-BatchConsumer">Batch 
Consumer</h3><p>This component implements the <a shape="rect" 
href="batch-consumer.html">Batch Consumer</a>.</p><p>This allows you for 
instance to know how many messages exists in this batch and for instance let 
the <a shape="rect" href="aggregator.html">Aggregator</a> aggregate this number 
of messages.</p><h3 id="BookComponentAppendix-Usage.1">Usage</h3><h4 
id="BookComponentAppendix-MessageheaderssetbytheSQSproducer">Message headers 
set by the SQS producer</h4><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Type<
 /p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>CamelAwsSqsMD5OfBody</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The MD5 checksum of the Amazon 
SQS message.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelAwsSqsMessageId</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The Amazon SQS message 
ID.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelAwsSqsDelaySeconds</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Since <strong>Camel 2.11</strong>, the 
delay seconds that the Amazon SQS message can be see by 
others.</p></td></tr></tbo
 dy></table></div><h4 
id="BookComponentAppendix-MessageheaderssetbytheSQSconsumer">Message headers 
set by the SQS consumer</h4><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" 
class="confluenceTd"><p><code>CamelAwsSqsMD5OfBody</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The MD5 checksum of the Amazon 
SQS message.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelAwsSqsMessageId</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The Amazon SQS message 
ID.</p></td></tr><tr><td colspan="1" rowspan="1" class="
 confluenceTd"><p><code>CamelAwsSqsReceiptHandle</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The Amazon SQS message receipt 
handle.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CamelAwsSqsAttributes</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>Map&lt;String, 
String&gt;</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>The Amazon SQS message 
attributes.</p></td></tr></tbody></table></div><h4 
id="BookComponentAppendix-AdvancedAmazonSQSconfiguration">Advanced AmazonSQS 
configuration</h4><p>If your Camel Application is running behind a firewall or 
if you need to have more control over the AmazonSQS instance configuration, you 
can create your own instance:</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[AWSCredentials awsCredentials = new 
BasicAWSCredentials(&quot;myAccessKey&quot;, &quot;mySecretKey&quot;);
+<script class="brush: java; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[AWSCredentials awsCredentials = new 
BasicAWSCredentials(&quot;myAccessKey&quot;, &quot;mySecretKey&quot;);
 
 ClientConfiguration clientConfiguration = new ClientConfiguration();
 clientConfiguration.setProxyHost(&quot;http://myProxyHost&quot;);
@@ -297,18 +297,18 @@ AmazonSQS client = new AmazonSQSClient(a
 registry.bind(&quot;client&quot;, client);
 ]]></script>
 </div></div><p>and refer to it in your Camel aws-sqs component 
configuration:</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;aws-sqs://MyQueue?amazonSQSClient=#client&amp;delay=5000&amp;maxMessagesPerPoll=5&quot;)
+<script class="brush: java; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[from(&quot;aws-sqs://MyQueue?amazonSQSClient=#client&amp;delay=5000&amp;maxMessagesPerPoll=5&quot;)
   .to(&quot;mock:result&quot;);
 ]]></script>
 </div></div><h3 
id="BookComponentAppendix-Dependencies">Dependencies</h3><p>Maven users will 
need to add the following dependency to their 
<strong><code>pom.xml</code></strong>.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>pom.xml</b></div><div class="codeContent 
panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-aws&lt;/artifactId&gt;
     &lt;version&gt;${camel-version}&lt;/version&gt;
 &lt;/dependency&gt;
 ]]></script>
 </div></div><p>where <strong><code>${camel-version</code>}</strong> must be 
replaced by the actual version of Camel (2.6 or higher).</p><h3 
id="BookComponentAppendix-JMS-styleSelectors">JMS-style Selectors</h3><p>SQS 
does not allow selectors, but you can effectively achieve this by using the <a 
shape="rect" href="message-filter.html">Camel Filter EIP</a> and setting an 
appropriate <strong><code>visibilityTimeout</code></strong>. When SQS 
dispatches a message, it will wait up to the visibility timeout before it will 
try to dispatch the message to a different consumer unless 
a&#160;<strong><code>DeleteMessage</code></strong> is received. By default, 
Camel will always send the&#160;<strong><code>DeleteMessage</code></strong> at 
the end of the route, unless the route ended in failure. To achieve appropriate 
filtering and not send the&#160;<strong><code>DeleteMessage</code></strong> 
even on successful completion of the route, use a Filter:</p><div class="code 
panel pdl" style="border-wid
 th: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[from(&quot;aws-sqs://MyQueue?amazonSQSClient=#client&amp;defaultVisibilityTimeout=5000&amp;deleteIfFiltered=false&quot;)
+<script class="brush: java; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[from(&quot;aws-sqs://MyQueue?amazonSQSClient=#client&amp;defaultVisibilityTimeout=5000&amp;deleteIfFiltered=false&quot;)
   .filter(&quot;${header.login} == true&quot;)
   .to(&quot;mock:result&quot;);
 ]]></script>
@@ -349,7 +349,7 @@ from("direct:start").bean(ExampleBean.cl
 <h3 id="BookComponentAppendix-URIformat.4">URI format</h3>
 
 <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[
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[
 browse:someName[?options]
 ]]></script>
 </div></div>
@@ -359,7 +359,7 @@ browse:someName[?options]
 <h3 id="BookComponentAppendix-Sample">Sample</h3>
 <p>In the route below, we insert a <code>browse:</code> component to be able 
to browse the Exchanges that are passing through:</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[
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[
   
from(&quot;activemq:order.in&quot;).to(&quot;browse:orderReceived&quot;).to(&quot;bean:processOrder&quot;);
 ]]></script>
 </div></div>
@@ -367,7 +367,7 @@ browse:someName[?options]
 <p>We can now inspect the received exchanges from within the Java code:</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[
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[
     private CamelContext context;
 
     public void inspectRecievedOrders() {
@@ -386,7 +386,7 @@ browse:someName[?options]
 
 <h3 id="BookComponentAppendix-SeeAlso.2">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> <h2 
id="BookComponentAppendix-CacheComponent">Cache Component</h2><div 
class="confluence-information-macro confluence-information-macro-warning"><span 
class="aui-icon aui-icon-small aui-iconfont-error 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>This component is deprecated. As 
of Camel 2.18.0 You should use <a shape="rect" 
href="ehcache.html">Ehcache</a>.</p></div></div><p><strong>Available as of 
Camel 2.1</strong></p><p>The <strong>cache</strong> component enables you to 
perform caching operations using EHCache as the Cache Implementation. The cache 
itself is created on demand or if a cache of that name already exists then it 
is simply utilized with its original s
 ettings.</p><p>This component supports producer and event based consumer 
endpoints.</p><p>The Cache consumer is an event based consumer and can be used 
to listen and respond to specific cache activities. If you need to perform 
selections from a pre-existing cache, use the processors defined for the cache 
component.</p><p>Maven users will need to add the following dependency to their 
<code>pom.xml</code> for this component:</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;dependency&gt;
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-cache&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
@@ -394,7 +394,7 @@ browse:someName[?options]
 &lt;/dependency&gt;
 ]]></script>
 </div></div><h3 id="BookComponentAppendix-URIformat.5">URI format</h3><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[cache://cacheName[?options]
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[cache://cacheName[?options]
 ]]></script>
 </div></div><p>You can append query options to the URI in the following 
format, <code>?option=value&amp;option=#beanRef&amp;...</code></p><h3 
id="BookComponentAppendix-Options.3">Options</h3><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>maxElementsInMemory</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The number of elements that may 
be stored in the defined cache</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>memoryStoreEvictionPolicy</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>MemoryStoreEvictionPolicy.LFU</code></p></td><td 
colspan="1"
  rowspan="1" class="confluenceTd"><p>The number of elements that may be stored 
in the defined cache. Options include</p><ul 
class="alternate"><li>MemoryStoreEvictionPolicy.LFU - Least frequently 
used</li><li>MemoryStoreEvictionPolicy.LRU - Least recently 
used</li><li>MemoryStoreEvictionPolicy.FIFO - first in first out, the oldest 
element by creation time</li></ul></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>overflowToDisk</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Specifies whether cache may overflow to 
disk</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>eternal</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Sets whether elements are eternal. If 
eternal, timeouts are ignored and the<br clear="none" 
class="atl-forced-newline"> eleme
 nt never expires.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>timeToLiveSeconds</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>300</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The maximum time between creation time and 
when an element expires.<br clear="none" class="atl-forced-newline"> Is used 
only if the element is not eternal</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>timeToIdleSeconds</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>300</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The maximum amount of time between accesses 
before an element expires</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>diskPersistent</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Whether the disk store persists between rest
 arts of the Virtual Machine.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>diskExpiryThreadIntervalSeconds</code></p></td><td
 colspan="1" rowspan="1" class="confluenceTd"><p><code>120</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The number of seconds between 
runs of the disk expiry thread.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>cacheManagerFactory</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> If 
you want to use a custom factory which instantiates and creates the EHCache 
<code>net.sf.ehcache.CacheManager</code>. <br clear="none" 
class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> 
<em>Type:</em> abstract 
org.apache.camel.component.cache.CacheManagerFactory</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>eventListenerRegistry</c
 ode></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.8:</strong> Sets a list of EHCache 
<code>net.sf.ehcache.event.CacheEventListener</code> for all new caches- no 
need to define it per cache in EHCache xml config anymore. <br clear="none" 
class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> 
<em>Type:</em> 
org.apache.camel.component.cache.CacheEventListenerRegistry</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>cacheLoaderRegistry</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> 
Sets a list of <code>org.apache.camel.component.cache.CacheLoaderWrapper</code> 
that extends EHCache <code>net.sf.ehcache.loader.CacheLoader</code> for all new 
caches- no need to define it per cache in EHCache xml config anymore. <br c
 lear="none" class="atl-forced-newline"> <br clear="none" 
class="atl-forced-newline"> <em>Type:</em> 
org.apache.camel.component.cache.CacheLoaderRegistry</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>key</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To 
configure using a cache key by default. If a key is provided in the message 
header, then the key from the header takes precedence.</p></td></tr><tr><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>operation</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To configure 
using an cache operation by default. If an operation in the message header, 
then the operation from the header takes precedence.</p></td></tr><tr><td 
colspan="1" rowspan="1" class="conf
 luenceTd"><p>objectCache</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong style="line-height: 1.42857;">Camel 
2.15:</strong> Whether to turn on allowing to store non serializable objects in 
the cache. If this option is enabled then overflow to disk cannot be enabled as 
well.</p></td></tr></tbody></table></div><h3 
id="BookComponentAppendix-CacheComponentoptions">Cache Component 
options</h3><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>configuration</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>To use a custom <code>org.ap
 ache.camel.component.cache.CacheConfiguration</code> 
configuration.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>cacheManagerFactory</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>To use a custom 
<code>org.apache.camel.component.cache.CacheManagerFactory</code>.</p></td></tr><tr><td
 colspan="1" rowspan="1" 
class="confluenceTd"><p><code>configurationFile</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.13/2.12.3:</strong> To configure the 
location of the <code>ehcache.xml</code> file to use, such as 
<code>classpath:com/foo/mycache.xml</code> to load from classpath. If no 
configuration is given, then the default settings from EHCache is 
used.</p></td></tr></tbody></table></div><h3 
id="BookComponentAppendix-Sending/ReceivingMessagesto/fromthecache"><span 
style="line-heigh
 t: 1.5625;">Sending/Receiving Messages to/from the cache</span></h3><h4 
id="BookComponentAppendix-MessageHeadersuptoCamel2.7">Message Headers up to 
Camel 2.7</h4><div class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>CACHE_OPERATION</code></p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>The operation to be performed 
on the cache. Valid options are</p><ul 
class="alternate"><li>GET</li><li>CHECK</li><li>ADD</li><li>UPDATE</li><li>DELETE</li><li>DELETEALL<br
 clear="none" class="atl-forced-newline"> <code>GET</code> and 
<code>CHECK</code> requires <strong>Camel 2.3</strong> 
onwards.</li></ul></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>CACHE_KEY</code></p></td><td colspan="1" 
rowspan="1" class="conflue
 nceTd"><p>The cache key used to store the Message in the cache. The cache key 
is optional if the CACHE_OPERATION is 
DELETEALL</p></td></tr></tbody></table></div></div>
 
@@ -406,7 +406,7 @@ browse:someName[?options]
 
 
 <h4 id="BookComponentAppendix-CacheProducer">Cache Producer</h4><p>Sending 
data to the cache involves the ability to direct payloads in exchanges to be 
stored in a pre-existing or created-on-demand cache. The mechanics of doing 
this involve</p><ul class="alternate"><li>setting the Message Exchange Headers 
shown above.</li><li>ensuring that the Message Exchange Body contains the 
message directed to the cache</li></ul><h4 
id="BookComponentAppendix-CacheConsumer">Cache Consumer</h4><p>Receiving data 
from the cache involves the ability of the CacheConsumer to listen on a 
pre-existing or created-on-demand Cache using an event Listener and receive 
automatic notifications when any cache activity take place (i.e 
CamelCacheGet/CamelCacheUpdate/CamelCacheDelete/CamelCacheDeleteAll). Upon such 
an activity taking place</p><ul class="alternate"><li>an exchange containing 
Message Exchange Headers and a Message Exchange Body containing the just 
added/updated payload is placed and sent.</li><li>in 
 case of a CamelCacheDeleteAll operation, the Message Exchange Header 
CamelCacheKey and the Message Exchange Body are not populated.</li></ul><h4 
id="BookComponentAppendix-CacheProcessors">Cache Processors</h4><p>There are a 
set of nice processors with the ability to perform cache lookups and 
selectively replace payload content at the</p><ul 
class="alternate"><li>body</li><li>token</li><li>xpath level</li></ul><h3 
id="BookComponentAppendix-CacheUsageSamples">Cache Usage Samples</h3><h4 
id="BookComponentAppendix-Example1:Configuringthecache">Example 1: Configuring 
the cache</h4><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;cache://MyApplicationCache&quot; +
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[from(&quot;cache://MyApplicationCache&quot; +
           &quot;?maxElementsInMemory=1000&quot; +
           &quot;&amp;memoryStoreEvictionPolicy=&quot; +
               &quot;MemoryStoreEvictionPolicy.LFU&quot; +
@@ -418,7 +418,7 @@ browse:someName[?options]
           &quot;&amp;diskExpiryThreadIntervalSeconds=300&quot;)
 ]]></script>
 </div></div><h4 
id="BookComponentAppendix-Example2:Addingkeystothecache">Example 2: Adding keys 
to the cache</h4><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
     public void configure() {
      from(&quot;direct:start&quot;)
      .setHeader(CacheConstants.CACHE_OPERATION, 
constant(CacheConstants.CACHE_OPERATION_ADD))
@@ -428,7 +428,7 @@ browse:someName[?options]
 };
 ]]></script>
 </div></div><h4 
id="BookComponentAppendix-Example2:Updatingexistingkeysinacache">Example 2: 
Updating existing keys in a cache</h4><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
     public void configure() {
      from(&quot;direct:start&quot;)
      .setHeader(CacheConstants.CACHE_OPERATION, 
constant(CacheConstants.CACHE_OPERATION_UPDATE))
@@ -438,7 +438,7 @@ browse:someName[?options]
 };
 ]]></script>
 </div></div><h4 
id="BookComponentAppendix-Example3:Deletingexistingkeysinacache">Example 3: 
Deleting existing keys in a cache</h4><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
     public void configure() {
      from(&quot;direct:start&quot;)
      .setHeader(CacheConstants.CACHE_OPERATION, 
constant(CacheConstants.CACHE_DELETE))
@@ -448,7 +448,7 @@ browse:someName[?options]
 };
 ]]></script>
 </div></div><h4 
id="BookComponentAppendix-Example4:Deletingallexistingkeysinacache">Example 4: 
Deleting all existing keys in a cache</h4><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
     public void configure() {
      from(&quot;direct:start&quot;)
      .setHeader(CacheConstants.CACHE_OPERATION, 
constant(CacheConstants.CACHE_DELETEALL))
@@ -457,7 +457,7 @@ browse:someName[?options]
 };
 ]]></script>
 </div></div><h4 
id="BookComponentAppendix-Example5:NotifyinganychangesregisteringinaCachetoProcessorsandotherProducers">Example
 5: Notifying any changes registering in a Cache to Processors and other 
Producers</h4><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
     public void configure() {
      from(&quot;cache://TestCache1&quot;)
      .process(new Processor() {
@@ -473,7 +473,7 @@ browse:someName[?options]
 };
 ]]></script>
 </div></div><h4 
id="BookComponentAppendix-Example6:UsingProcessorstoselectivelyreplacepayloadwithcachevalues">Example
 6: Using Processors to selectively replace payload with cache values</h4><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
    public void configure() {
      //Message Body Replacer
      from(&quot;cache://TestCache1&quot;)
@@ -499,7 +499,7 @@ browse:someName[?options]
 };
 ]]></script>
 </div></div><h4 
id="BookComponentAppendix-Example7:GettinganentryfromtheCache">Example 7: 
Getting an entry from the Cache</h4><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;)
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
     // Prepare headers
     .setHeader(CacheConstants.CACHE_OPERATION, 
constant(CacheConstants.CACHE_OPERATION_GET))
     .setHeader(CacheConstants.CACHE_KEY, 
constant(&quot;Ralph_Waldo_Emerson&quot;)).
@@ -515,7 +515,7 @@ browse:someName[?options]
     .to(&quot;direct:nextPhase&quot;);
 ]]></script>
 </div></div><h4 
id="BookComponentAppendix-Example8:CheckingforanentryintheCache">Example 8: 
Checking for an entry in the Cache</h4><p>Note: The CHECK command tests 
existence of an entry in the cache but doesn't place a message in the 
body.</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;)
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;)
     // Prepare headers
     .setHeader(CacheConstants.CACHE_OPERATION, 
constant(CacheConstants.CACHE_OPERATION_CHECK))
     .setHeader(CacheConstants.CACHE_KEY, 
constant(&quot;Ralph_Waldo_Emerson&quot;)).
@@ -530,7 +530,7 @@ browse:someName[?options]
     .end();
 ]]></script>
 </div></div><h3 id="BookComponentAppendix-ManagementofEHCache">Management of 
EHCache</h3><p><a shape="rect" class="external-link" href="http://ehcache.org/"; 
rel="nofollow">EHCache</a> has its own statistics and management from <a 
shape="rect" href="camel-jmx.html">JMX</a>.</p><p>Here's a snippet on how to 
expose them via JMX in a Spring application context:</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;bean 
id=&quot;ehCacheManagementService&quot; 
class=&quot;net.sf.ehcache.management.ManagementService&quot; 
init-method=&quot;init&quot; lazy-init=&quot;false&quot;&gt;
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[&lt;bean 
id=&quot;ehCacheManagementService&quot; 
class=&quot;net.sf.ehcache.management.ManagementService&quot; 
init-method=&quot;init&quot; lazy-init=&quot;false&quot;&gt;
   &lt;constructor-arg&gt;
     &lt;bean class=&quot;net.sf.ehcache.CacheManager&quot; 
factory-method=&quot;getInstance&quot;/&gt;
   &lt;/constructor-arg&gt;
@@ -544,22 +544,22 @@ browse:someName[?options]
 &lt;/bean&gt;
 ]]></script>
 </div></div><p>Of course you can do the same thing in straight Java:</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[ManagementService.registerMBeans(CacheManager.getInstance(),
 mbeanServer, true, true, true, true);
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[ManagementService.registerMBeans(CacheManager.getInstance(),
 mbeanServer, true, true, true, true);
 ]]></script>
 </div></div><p>You can get cache hits, misses, in-memory hits, disk hits, size 
stats this way. You can also change CacheConfiguration parameters on the 
fly.</p><h3 id="BookComponentAppendix-CachereplicationCamel2.8+">Cache 
replication Camel 2.8+</h3><p>The Camel Cache component is able to distribute a 
cache across server nodes using several different replication mechanisms 
including: RMI, JGroups, JMS and Cache Server.</p><p>There are two different 
ways to make it work:</p><p><strong>1.</strong> You can configure 
<code>ehcache.xml</code> manually</p><p>OR</p><p><strong>2.</strong> You can 
configure these three options:</p><ul 
class="alternate"><li>cacheManagerFactory</li><li>eventListenerRegistry</li><li>cacheLoaderRegistry</li></ul><p>Configuring
 Camel Cache replication using the first option is a bit of hard work as you 
have to configure all caches separately. So in a situation when the all names 
of caches are not known, using <code>ehcache.xml</code> is not a good 
idea.</p><p>The
  second option is much better when you want to use many different caches as 
you do not need to define options per cache. This is because replication 
options are set per <code>CacheManager</code> and per 
<code>CacheEndpoint</code>. Also it is the only way when cache names are not 
know at the development phase.</p><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>It might be useful to read the <a 
shape="rect" class="external-link" href="http://ehcache.org/documentation"; 
rel="nofollow">EHCache manual</a> to get a better understanding of the Camel 
Cache replication mechanism.</p></div></div><h4 
id="BookComponentAppendix-Example:JMScachereplication">Example: JMS cache 
replication</h4><p>JMS replication is the most powerful and secured replication 
method. Used together with Camel Cache replication makes it also rath
 er simple.<br clear="none"> An example is available on <a shape="rect" 
href="cachereplicationjmsexample.html">a separate page</a>.</p> <h2 
id="BookComponentAppendix-ClassComponent">Class 
Component</h2><p><strong>Available as of Camel 2.4</strong></p><p>The 
<strong>class:</strong> component binds beans to Camel message exchanges. It 
works in the same way as the <a shape="rect" href="bean.html">Bean</a> 
component but instead of looking up beans from a <a shape="rect" 
href="registry.html">Registry</a> it creates the bean based on the class 
name.</p><h3 id="BookComponentAppendix-URIformat.6">URI format</h3><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[class:className[?options]
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[class:className[?options]
 ]]></script>
 </div></div><p>Where <strong>className</strong> is the fully qualified class 
name to create and use as bean.</p><h3 
id="BookComponentAppendix-Options.4">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>Type</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>method</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>The method name that bean will be invoked. 
If not provided, Camel will try to pick the method itself. In case of ambiguity 
an exception is thrown. See <a shape="re
 ct" href="bean-binding.html">Bean Binding</a> for more 
details.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>multiParameterArray</code></p></td><td 
colspan="1" rowspan="1" 
class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>How to treat the parameters which are 
passed from the message body; if it is <code>true</code>, the In message body 
should be an array of parameters.</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>bean.xxx</code></p></td><td colspan="1" 
rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p><strong>Camel 2.17:</strong> To configure additional 
options on the create bean instance from the class name. For example to 
configure a foo option on the bean, use bean.fo
 o=123.</p></td></tr></tbody></table></div></div>
 
 
 <p>You can append query options to the URI in the following format, 
<code>?option=value&amp;option=value&amp;...</code></p><h3 
id="BookComponentAppendix-Using.1">Using</h3><p>You simply use the 
<strong>class</strong> component just as the <a shape="rect" 
href="bean.html">Bean</a> component but by specifying the fully qualified 
classname instead.<br clear="none"> For example to use the 
<code>MyFooBean</code> you have to do as follows:</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;).to(&quot;class:org.apache.camel.component.bean.MyFooBean&quot;).to(&quot;mock:result&quot;);
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[    
from(&quot;direct:start&quot;).to(&quot;class:org.apache.camel.component.bean.MyFooBean&quot;).to(&quot;mock:result&quot;);
 ]]></script>
 </div></div><p>You can also specify which method to invoke on the 
<code>MyFooBean</code>, for example <code>hello</code>:</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;).to(&quot;class:org.apache.camel.component.bean.MyFooBean?method=hello&quot;).to(&quot;mock:result&quot;);
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[    
from(&quot;direct:start&quot;).to(&quot;class:org.apache.camel.component.bean.MyFooBean?method=hello&quot;).to(&quot;mock:result&quot;);
 ]]></script>
 </div></div><h2 
id="BookComponentAppendix-Settingpropertiesonthecreatedinstance">Setting 
properties on the created instance</h2><p>In the endpoint uri you can specify 
properties to set on the created instance, for example if it has a 
<code>setPrefix</code> method:</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[   // Camel 2.17 onwards
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[   // Camel 2.17 onwards
    from(&quot;direct:start&quot;)
         
.to(&quot;class:org.apache.camel.component.bean.MyPrefixBean?bean.prefix=Bye&quot;)
         .to(&quot;mock:result&quot;);
@@ -570,7 +570,7 @@ browse:someName[?options]
         .to(&quot;mock:result&quot;);
 ]]></script>
 </div></div><p>And you can also use the <code style="line-height: 
1.42857;">#</code> syntax to refer to properties to be looked up in the <a 
shape="rect" href="registry.html">Registry</a>.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[    // Camel 2.17 onwards
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[    // Camel 2.17 onwards
     from(&quot;direct:start&quot;)
         
.to(&quot;class:org.apache.camel.component.bean.MyPrefixBean?bean.cool=#foo&quot;)
         .to(&quot;mock:result&quot;);
@@ -582,7 +582,7 @@ browse:someName[?options]
 ]]></script>
 </div></div><p>Which will lookup a bean from the <a shape="rect" 
href="registry.html">Registry</a> with the id <code>foo</code> and invoke the 
<code>setCool</code> method on the created instance of the 
<code>MyPrefixBean</code> class.</p><div class="confluence-information-macro 
confluence-information-macro-tip"><p class="title">See more</p><span 
class="aui-icon aui-icon-small aui-iconfont-approve 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>See more details at the <a 
shape="rect" href="bean.html">Bean</a> component as the <strong>class</strong> 
component works in much the same way.</p></div></div><p></p><h3 
id="BookComponentAppendix-SeeAlso.3">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="bean.html">Bean</a></li><li><a shape="rect" 
href="bean-binding.html">Bean Binding</a></li><li><a shape="rect" 
href="bean-integration.html">Bean Integration</a></li></ul> <h2 
id="BookComponentAppendix-CometdComponent">Cometd Component</h2><p>The 
<strong>cometd:</strong> component is a transport for working with the <a 
shape="rect" class="external-link" href="http://www.mortbay.org/jetty"; 
rel="nofollow">jetty</a> implementation of the <a shape="rect" 
class="external-link" 
href="http://docs.codehaus.org/display/JETTY/Cometd+%28aka+Bayeux%29"; 
rel="nofollow">cometd/bayeux protocol</a>.<br clear="none"> Using this 
component in combination with the dojo toolkit library it's possible to push
  Camel messages directly into the browser using an AJAX based 
mechanism.</p><p>Maven users will need to add the following dependency to their 
<code>pom.xml</code> for this component:</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;dependency&gt;
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-cometd&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
@@ -590,7 +590,7 @@ browse:someName[?options]
 &lt;/dependency&gt;
 ]]></script>
 </div></div><h3 id="BookComponentAppendix-URIformat.7">URI format</h3><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[cometd://host:port/channelName[?options]
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[cometd://host:port/channelName[?options]
 ]]></script>
 </div></div><p>The <strong>channelName</strong> represents a topic that can be 
subscribed to by the Camel endpoints.</p><h3 
id="BookComponentAppendix-Examples">Examples</h3><div class="preformatted 
panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
 <pre>cometd://localhost:8080/service/mychannel
@@ -600,7 +600,7 @@ cometds://localhost:8443/service/mychann
 
 
 <p>You can append query options to the URI in the following format, 
<code>?option=value&amp;option=value&amp;...</code></p><p>Here is some examples 
on How to pass the parameters</p><p>For file (for webapp resources located in 
the Web Application directory --&gt; 
cometd://localhost:8080?resourceBase=file./webapp<br clear="none"> For 
classpath (when by example the web resources are packaged inside the webapp 
folder --&gt; cometd://localhost:8080?resourceBase=classpath:webapp</p><h3 
id="BookComponentAppendix-Authentication">Authentication</h3><p><strong>Available
 as of Camel 2.8</strong></p><p>You can configure custom 
<code>SecurityPolicy</code> and <code>Extension</code>'s to the 
<code>CometdComponent</code> which allows you to use authentication as <a 
shape="rect" class="external-link" 
href="http://cometd.org/documentation/howtos/authentication"; 
rel="nofollow">documented here</a></p><h3 
id="BookComponentAppendix-SettingupSSLforCometdComponent">Setting up SSL for 
Cometd Component</h3>
 <h4 id="BookComponentAppendix-UsingtheJSSEConfigurationUtility">Using the JSSE 
Configuration Utility</h4><p>As of Camel 2.9, the Cometd component supports 
SSL/TLS configuration through the <a shape="rect" 
href="camel-configuration-utilities.html">Camel JSSE Configuration 
Utility</a>.&#160; This utility greatly decreases the amount of component 
specific code you need to write and is configurable at the endpoint and 
component levels.&#160; The following examples demonstrate how to use the 
utility with the Cometd component. You need to configure SSL on the 
CometdComponent.</p><h5 
id="BookComponentAppendix-Programmaticconfigurationofthecomponent">Programmatic 
configuration of the component</h5><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[KeyStoreParameters ksp = new 
KeyStoreParameters();
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[KeyStoreParameters ksp = new 
KeyStoreParameters();
 ksp.setResource(&quot;/users/home/server/keystore.jks&quot;);
 ksp.setPassword(&quot;keystorePassword&quot;);
 
@@ -619,7 +619,7 @@ CometdComponent commetdComponent = getCo
 commetdComponent.setSslContextParameters(scp);
 ]]></script>
 </div></div><h5 
id="BookComponentAppendix-SpringDSLbasedconfigurationofendpoint">Spring DSL 
based configuration of endpoint</h5><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[...
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[...
   &lt;camel:sslContextParameters
       id=&quot;sslContextParameters&quot;&gt;
     &lt;camel:keyManagers
@@ -643,7 +643,7 @@ commetdComponent.setSslContextParameters
 ]]></script>
 </div></div><p></p><h3 id="BookComponentAppendix-SeeAlso.4">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> <h2 
id="BookComponentAppendix-ContextComponent">Context 
Component</h2><p><strong>Available as of Camel 2.7</strong></p><div 
class="confluence-information-macro confluence-information-macro-warning"><span 
class="aui-icon aui-icon-small aui-iconfont-error 
confluence-information-macro-icon"></span><div 
class="confluence-information-macro-body"><p>Deprecated do NOT 
use</p></div></div><p>&#160;</p><p>The <strong>context</strong> component 
allows you to create new Camel Components from a CamelContext with a number of 
routes which is then treated as a black box, allowing you to refer to the local 
endpoints within the component from other CamelContexts.</p><p>It is similar to 
the <a shape="rect" href="routebox.html">Rou
 tebox</a> component in idea, though the Context component tries to be really 
simple for end users; just a simple convention over configuration approach to 
refer to local endpoints inside the CamelContext Component.</p><p>Maven users 
will need to add the following dependency to their <code>pom.xml</code> for 
this component:</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;dependency&gt;
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-context&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
@@ -651,13 +651,13 @@ commetdComponent.setSslContextParameters
 &lt;/dependency&gt;
 ]]></script>
 </div></div><h3 id="BookComponentAppendix-URIformat.8">URI format</h3><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[context:camelContextId:localEndpointName[?options]
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[context:camelContextId:localEndpointName[?options]
 ]]></script>
 </div></div><p>Or you can omit the "context:" prefix.</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[camelContextId:localEndpointName[?options]
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[camelContextId:localEndpointName[?options]
 ]]></script>
 </div></div><ul><li><strong>camelContextId</strong> is the ID you used to 
register the CamelContext into the <a shape="rect" 
href="registry.html">Registry</a>.</li><li><strong>localEndpointName</strong> 
can be a valid Camel URI evaluated within the black box CamelContext. Or it can 
be a logical name which is mapped to any local endpoints. For example if you 
locally have endpoints like <strong>direct:invoices</strong> and 
<strong>seda:purchaseOrders</strong> inside a CamelContext of id 
<strong>supplyChain</strong>, then you can just use the URIs 
<strong>supplyChain:invoices</strong> or 
<strong>supplyChain:purchaseOrders</strong> to omit the physical endpoint kind 
and use pure logical URIs.</li></ul><p>You can append query options to the URI 
in the following format, 
<code>?option=value&amp;option=value&amp;...</code></p><h3 
id="BookComponentAppendix-Example">Example</h3><p>In this example we'll create 
a black box context, then we'll use it from another CamelContext.</p><h4 
id="BookCom
 ponentAppendix-Definingthecontextcomponent">Defining the context 
component</h4><p>First you need to create a CamelContext, add some routes in 
it, start it and then register the CamelContext into the <a shape="rect" 
href="registry.html">Registry</a> (JNDI, Spring, Guice or OSGi etc).</p><p>This 
can be done in the usual Camel way from this <a shape="rect" 
class="external-link" 
href="http://svn.apache.org/viewvc/camel/trunk/components/camel-context/src/test/java/org/apache/camel/component/context/JavaDslBlackBoxTest.java?revision=1069442&amp;view=markup";>test
 case</a> (see the createRegistry() method); this example shows Java and JNDI 
being used...</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[// lets create our black box as a camel 
context and a set of routes
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[// lets create our black box as a camel 
context and a set of routes
 DefaultCamelContext blackBox = new DefaultCamelContext(registry);
 blackBox.setName(&quot;blackBox&quot;);
 blackBox.addRoutes(new RouteBuilder() {
@@ -675,7 +675,7 @@ blackBox.start();
 registry.bind(&quot;accounts&quot;, blackBox);
 ]]></script>
 </div></div><p>Notice in the above route we are using pure local endpoints 
(<strong>direct</strong> and <strong>seda</strong>). Also note we expose this 
CamelContext using the <strong>accounts</strong> ID. We can do the same thing 
in Spring via</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;accounts&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext id=&quot;accounts&quot; 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
   &lt;route&gt; 
     &lt;from uri=&quot;direct:purchaseOrder&quot;/&gt;
     ...
@@ -684,7 +684,7 @@ registry.bind(&quot;accounts&quot;, blac
 &lt;/camelContext&gt;
 ]]></script>
 </div></div><h4 id="BookComponentAppendix-Usingthecontextcomponent">Using the 
context component</h4><p>Then in another CamelContext we can then refer to this 
"accounts black box" by just sending to <strong>accounts:purchaseOrder</strong> 
and consuming from <strong>accounts:invoice</strong>.</p><p>If you prefer to be 
more verbose and explicit you could use 
<strong>context:accounts:purchaseOrder</strong> or even 
<strong>context:accounts:direct://purchaseOrder</strong> if you prefer. But 
using logical endpoint URIs is preferred as it hides the implementation detail 
and provides a simple logical naming scheme.</p><p>For example if we wish to 
then expose this accounts black box on some middleware (outside of the black 
box) we can do things like...</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[&lt;camelContext 
xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
   &lt;route&gt; 
     &lt;!-- consume from an ActiveMQ into the black box --&gt;
     &lt;from uri=&quot;activemq:Accounts.PurchaseOrders&quot;/&gt;
@@ -895,18 +895,18 @@ Payload:
 &lt;/Customer&gt;
 </plain-text-body><p>Will print the message:</p><parameter 
ac:name="language">xml</parameter><plain-text-body>Request: type=gold, 
active=true, customerData=&lt;Customer.toString() representation&gt;
 </plain-text-body><p>For more examples on how to process requests and write 
responses can be found <a shape="rect" class="external-link" 
href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/";>here</a>.</p><h3
 id="BookComponentAppendix-ConsumingaRESTRequest-DefaultBindingStyle">Consuming 
a REST Request - Default Binding Style</h3><p>The&#160;<a shape="rect" 
class="external-link" href="https://cwiki.apache.org/CXF20DOC/JAX-RS";>CXF JAXRS 
front end</a> implements the <a shape="rect" class="external-link" 
href="https://jsr311.java.net/"; rel="nofollow">JAX-RS (JSR-311) API</a>, so we 
can export the resources classes as a REST service. And we leverage the <a 
shape="rect" class="external-link" 
href="http://cwiki.apache.org/confluence/display/CXF20DOC/Invokers";>CXF Invoker 
API</a> to turn a REST request into a normal Java object method invocation.<br 
clear="none"> Unlike the <a shape="rect" href="restlet.html
 ">Camel Restlet</a>&#160;component, you don't need to specify the URI template 
within your endpoint, CXF takes care of the REST request URI to resource class 
method mapping according to the JSR-311 specification. All you need to do in 
Camel is delegate this method request to a right processor or 
endpoint.</p><p>Here is an example of a CXFRS 
route...<plain-text-body>{snippet:id=example|lang=java|url=camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java}</plain-text-body>And
 the corresponding resource class used to configure the 
endpoint...</p><parameter ac:name="title">Note about resource 
classes</parameter><rich-text-body><p>By default, JAX-RS resource classes are 
<strong>only </strong>used to configure JAX-RS properties. Methods will 
<strong>not</strong> be executed during routing of messages to the endpoint. 
Instead, it is the responsibility of the route to do all processing.</p><p>Note 
that starting from Camel 2.15 it is also s
 ufficient to provide an interface only as opposed to a no-op service 
implementation class for the default mode.</p><p>Starting from Camel 2.15, if a 
<strong>performInvocation</strong> option is enabled, the service 
implementation will be invoked first, the response will be set on the Camel 
exchange and the route execution will continue as usual. This can be useful 
for</p><p>integrating the existing JAX-RS implementations into Camel routes and 
for post-processing JAX-RS Responses in custom 
processors.</p><p>&#160;</p></rich-text-body><p><plain-text-body>{snippet:id=example|lang=java|url=camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/testbean/CustomerServiceResource.java}</plain-text-body></p><h3
 
id="BookComponentAppendix-HowtoinvoketheRESTservicethroughcamel-cxfrsproducer">How
 to invoke the REST service through camel-cxfrs producer</h3><p>The&#160;<a 
shape="rect" class="external-link" 
href="https://cwiki.apache.org/CXF20DOC/JAX-RS";>CXF JAXRS front
  end</a> implements <a shape="rect" class="external-link" 
href="https://cwiki.apache.org/CXF20DOC/JAX-RS+Client+API#JAX-RSClientAPI-Proxy-basedAPI";>a
 proxy-based client API</a>, with this API you can invoke the remote REST 
service through a proxy. The&#160;<code>camel-cxfrs</code> producer is based on 
this <a shape="rect" class="external-link" 
href="https://cwiki.apache.org/CXF20DOC/JAX-RS+Client+API#JAX-RSClientAPI-Proxy-basedAPI";>proxy
 API</a>.<br clear="none"> You just need to specify the operation name in the 
message header and prepare the parameter in the message body, the 
<span>camel-cxfrs</span>&#160;producer will generate right REST request for 
you.</p><p>Here is an 
example:<plain-text-body>{snippet:id=ProxyExample|lang=java|url=camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java}</plain-text-body>The&#160;<a
 shape="rect" class="external-link" 
href="https://cwiki.apache.org/CXF20DOC/JAX-RS";>CXF JAXRS front end</a> also p
 rovides <a shape="rect" 
href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Client+API#JAX-RSClientAPI-CXFWebClientAPI";>a
 http centric client API</a>.&#160;You can also invoke this API from 
<code>camel-cxfrs</code> producer. You need to specify the <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html#HTTP_PATH";>HTTP_PATH</a>
 and the&#160;<a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html#HTTP_METHOD";>HTTP_METHOD</a>&#160;and
 let the&#160;producer use the http centric client API by using the URI option 
<strong>httpClientAPI</strong> or by setting the message header <a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-cxf/apidocs/org/apache/camel/component/cxf/CxfConstants.html#CAMEL_CXF_RS_USING_HTTP_API";>CxfConstants.CAMEL_CXF_RS_USING_HTTP_API</a>.
 You can turn the response ob
 ject to the type class specified with the message header&#160;<a shape="rect" 
class="external-link" 
href="http://camel.apache.org/maven/current/camel-cxf/apidocs/org/apache/camel/component/cxf/CxfConstants.html#CAMEL_CXF_RS_RESPONSE_CLASS";>CxfConstants.CAMEL_CXF_RS_RESPONSE_CLASS</a>.<plain-text-body>{snippet:id=HttpExample|lang=java|url=camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java}</plain-text-body>From
 Camel 2.1, we also support to specify the query parameters from cxfrs URI for 
the CXFRS http centric 
client.<plain-text-body>{snippet:id=QueryExample|lang=java|url=camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java}</plain-text-body>To
 support the Dynamical routing, you can override the URI's query parameters by 
using the CxfConstants.CAMEL_CXF_RS_QUERY_MAP header to set the parameter map 
for it.<plain-text-body>{snippet:id=QueryMapExample|lang=java|url=camel/trunk/c
 
omponents/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java}</plain-text-body></p>
 <h2 id="BookComponentAppendix-DataSetComponent">DataSet Component</h2><p><a 
shape="rect" href="testing.html">Testing</a> of distributed and asynchronous 
processing is notoriously difficult. The <a shape="rect" 
href="mock.html">Mock</a>, <a shape="rect" href="test.html">Test</a> and <a 
shape="rect" href="dataset.html">DataSet</a> endpoints work great with the <a 
shape="rect" href="testing.html">Camel Testing Framework</a> to simplify your 
unit and integration testing using <a shape="rect" 
href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> 
and Camel's large range of <a shape="rect" 
href="components.html">Components</a> together with the powerful <a 
shape="rect" href="bean-integration.html">Bean Integration</a>.</p><p>The 
DataSet component provides a mechanism to easily perform load &amp; soak 
testing of your system. It works by allowing you 
 to create <a shape="rect" class="external-link" 
href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/component/dataset/DataSet.html";>DataSet
 instances</a> both as a source of messages and as a way to assert that the 
data set is received.</p><p>Camel will use the <a shape="rect" 
href="log.html">throughput logger</a> when sending dataset's.</p><h3 
id="BookComponentAppendix-URIformat.13">URI format</h3><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[dataset:name[?options]
+<script class="brush: bash; gutter: false; theme: Confluence" 
type="syntaxhighlighter"><![CDATA[dataset:name[?options]
 ]]></script>

[... 2584 lines stripped ...]

Reply via email to