You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2018/05/21 05:25:24 UTC
svn commit: r1030133 [3/14] - in /websites/production/camel/content: ./
cache/
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 Mon May 21 05:25:23 2018
@@ -90,7 +90,7 @@
<tbody>
<tr>
<td valign="top" width="100%">
-<div class="wiki-content maincontent"><div class="chapter" id="chapter-component-appendix"><h1 id="BookComponentAppendix-ComponentAppendix">Component Appendix</h1><p>There now follows the documentation on each Camel component.</p><h2 id="BookComponentAppendix-ActiveMQComponent">ActiveMQ Component</h2><p>The ActiveMQ component allows messages to be sent to a <a shape="rect" class="external-link" href="http://java.sun.com/products/jms/" rel="nofollow">JMS</a> Queue or Topic or messages to be consumed from a JMS Queue or Topic using <a shape="rect" class="external-link" href="http://activemq.apache.org/" title="The most popular and powerful open source message broker">Apache ActiveMQ</a>. This component is based on <a shape="rect" href="jms.html">JMS Component</a> and uses Spring's JMS support for declarative transactions, using Spring's <strong><code>JmsTemplate</code></strong> for sending and a <strong><code>MessageListenerContainer</code></strong> for consuming. All the options from
the <a shape="rect" href="jms.html">JMS</a> component also applies for this component.</p><p>To use this component make sure you have the <strong><code>activemq.jar</code></strong> or <strong><code>activemq-core.jar</code></strong> on your classpath along with any Camel dependencies such as <strong><code>camel-core.jar</code></strong>, <strong><code>camel-spring.jar</code></strong> and <strong><code>camel-jms.jar</code></strong>.</p><parameter ac:name="title">Transacted and caching</parameter><rich-text-body><p>See section <em>Transactions and Cache Levels</em> below on <a shape="rect" href="jms.html">JMS</a> page if you are using transactions with <a shape="rect" href="jms.html">JMS</a> as it can impact performance.</p></rich-text-body><h3 id="BookComponentAppendix-URIformat">URI format</h3><plain-text-body>activemq:[queue:|topic:]destinationName
+<div class="wiki-content maincontent"><div class="chapter conf-macro output-block" id="chapter-component-appendix" data-hasbody="true" data-macro-name="div"><h1 id="BookComponentAppendix-ComponentAppendix">Component Appendix</h1><p>There now follows the documentation on each Camel component.</p><div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookComponentAppendix-ActiveMQComponent">ActiveMQ Component</h2><p>The ActiveMQ component allows messages to be sent to a <a shape="rect" class="external-link" href="http://java.sun.com/products/jms/" rel="nofollow">JMS</a> Queue or Topic or messages to be consumed from a JMS Queue or Topic using <a shape="rect" class="external-link" href="http://activemq.apache.org/" title="The most popular and powerful open source message broker">Apache ActiveMQ</a>. This component is based on <a shape="rect" href="jms.html">JMS Component</a> and uses Spring's JMS support for declarative transactions, using Spring's
<strong><code>JmsTemplate</code></strong> for sending and a <strong><code>MessageListenerContainer</code></strong> for consuming. All the options from the <a shape="rect" href="jms.html">JMS</a> component also applies for this component.</p><p>To use this component make sure you have the <strong><code>activemq.jar</code></strong> or <strong><code>activemq-core.jar</code></strong> on your classpath along with any Camel dependencies such as <strong><code>camel-core.jar</code></strong>, <strong><code>camel-spring.jar</code></strong> and <strong><code>camel-jms.jar</code></strong>.</p><parameter ac:name="title">Transacted and caching</parameter><rich-text-body><p>See section <em>Transactions and Cache Levels</em> below on <a shape="rect" href="jms.html">JMS</a> page if you are using transactions with <a shape="rect" href="jms.html">JMS</a> as it can impact performance.</p></rich-text-body><h3 id="BookComponentAppendix-URIformat">URI format</h3><plain-text-body>activemq:[queue:|topic:]de
stinationName
</plain-text-body><p>Where <strong><code>destinationName</code></strong> is an ActiveMQ queue or topic name. By default, the <strong><code>destinationName</code></strong> is interpreted as a queue name. For example, to connect to the queue, <strong><code>FOO.BAR</code></strong>, use:</p><plain-text-body>activemq:FOO.BAR
</plain-text-body><p>You can include the optional <strong><code>queue:</code></strong> prefix, if you prefer:</p><plain-text-body>activemq:queue:FOO.BAR
</plain-text-body><p>To connect to a topic, you must include the <strong><code>topic:</code></strong> prefix. For example, to connect to the topic, <strong><code>Stocks.Prices</code></strong>, use:</p><plain-text-body>activemq:topic:Stocks.Prices
@@ -203,121 +203,121 @@ droppable = false
<artifactId>activemq-camel</artifactId>
<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: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[<dependency>
+</plain-text-body><p><parameter ac:name=""><a shape="rect" href="endpoint-see-also.html">Endpoint See Also</a></parameter></p></div> <div class="error conf-macro output-block" data-hasbody="false" data-macro-name="include"><span class="error">Unable to render {include}</span> The included page could not be found.</div> <div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><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</strong> 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 conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"><dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-amqp</artifactId>
<version>${camel.version}</version> <!-- use the same version as your Camel core version -->
</dependency>
-]]></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>
-</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
-from("amqp:queue:incoming")
+</pre>
+</div></div><h3 id="BookComponentAppendix-URIformat.1">URI format</h3><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">amqp:[queue:|topic:]destinationName[?options]
+</pre>
+</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 conf-macro output-block" data-hasbody="true" data-macro-name="code" 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">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">// Consuming from AMQP queue
+from("amqp:queue:incoming")
.to(...);
-Â
+ 
// Sending message to the AMQP topic
from(...)
- .to("amqp:topic:notify");]]></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 topic prefix: </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("amqp://guest:guest@localhost:5672");]]></script>
-</div></div><p>Keep in mind that starting from the <strong>Camel 2.17</strong> the <strong><code>AMQPComponent#amqp10Component(String connectionURI)</code></strong> factory method has been deprecated on the behalf of the <strong><code>AMQPComponent#amqpComponent(String connectionURI)</code></strong>: </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("amqp://localhost:5672");
-Â
-AMQPComponent authorizedAmqp = AMQPComponent.amqpComponent("amqp://localhost:5672", "user", "password");]]></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 <strong><code>org.apache.camel.component.amqp.AMQPConnectionDetails</code></strong> to the registry. For example for Spring Boot you just have to define 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
+ .to("amqp:topic:notify");</pre>
+</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 topic prefix: </p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" 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">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"> AMQPComponent amqp = AMQPComponent.amqp10Component("amqp://guest:guest@localhost:5672");</pre>
+</div></div><p>Keep in mind that starting from the <strong>Camel 2.17</strong> the <strong><code>AMQPComponent#amqp10Component(String connectionURI)</code></strong> factory method has been deprecated on the behalf of the <strong><code>AMQPComponent#amqpComponent(String connectionURI)</code></strong>: </p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" 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">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">AMQPComponent amqp = AMQPComponent.amqpComponent("amqp://localhost:5672");
+ 
+AMQPComponent authorizedAmqp = AMQPComponent.amqpComponent("amqp://localhost:5672", "user", "password");</pre>
+</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 <strong><code>org.apache.camel.component.amqp.AMQPConnectionDetails</code></strong> to the registry. For example for Spring Boot you just have to define bean:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" 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">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">@Bean
AMQPConnectionDetails amqpConnection() {
- return new AMQPConnectionDetails("amqp://lcoalhost:5672");
+ return new AMQPConnectionDetails("amqp://lcoalhost:5672");
}
-Â
+ 
@Bean
AMQPConnectionDetails securedAmqpConnection() {
- return new AMQPConnectionDetails("amqp://lcoalhost:5672", "username", "password");
-}]]></script>
-</div></div><p> </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 <strong><code>AMQPConnectionDetails.discoverAMQP()</code></strong> attempts to read Camel properties in a Kubernetes-like convention, just as demonstrated on the snippet below:</p><p> </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 = "mybroker.com"
-export AMQP_SERVICE_PORT = "6666"
-export AMQP_SERVICE_USERNAME = "username"
-export AMQP_SERVICE_PASSWORD = "password"
-Â
+ return new AMQPConnectionDetails("amqp://lcoalhost:5672", "username", "password");
+}</pre>
+</div></div><p> </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 <strong><code>AMQPConnectionDetails.discoverAMQP()</code></strong> attempts to read Camel properties in a Kubernetes-like convention, just as demonstrated on the snippet below:</p><p> </p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" 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">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">export AMQP_SERVICE_HOST = "mybroker.com"
+export AMQP_SERVICE_PORT = "6666"
+export AMQP_SERVICE_USERNAME = "username"
+export AMQP_SERVICE_PASSWORD = "password"
+ 
...
-Â
+ 
@Bean
AMQPConnectionDetails amqpConnection() {
return AMQPConnectionDetails.discoverAMQP();
}
-]]></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[<bean id="jmsConnectionFactory" class="org.apache.qpid.jms.JmsConnectionFactory">
- <property name="remoteURI" value="amqp://localhost:5672" />
- <property name="username" value="admin"/>
- <property name="password" value="admin"/>
+</pre>
+</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 conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml; gutter: false; theme: Default" data-theme="Default"><bean id="jmsConnectionFactory" class="org.apache.qpid.jms.JmsConnectionFactory">
+ <property name="remoteURI" value="amqp://localhost:5672" />
+ <property name="username" value="admin"/>
+ <property name="password" value="admin"/>
</bean>
-<bean id="jmsCachingConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
- <property name="targetConnectionFactory" ref="jmsConnectionFactory" />
+<bean id="jmsCachingConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
+ <property name="targetConnectionFactory" ref="jmsConnectionFactory" />
</bean>
-<bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration" >
- <property name="connectionFactory" ref="jmsCachingConnectionFactory" />
- <property name="cacheLevelName" value="CACHE_CONSUMER" />
+<bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration" >
+ <property name="connectionFactory" ref="jmsCachingConnectionFactory" />
+ <property name="cacheLevelName" value="CACHE_CONSUMER" />
</bean>
-<bean id="amqp" class="org.apache.camel.component.amqp.AMQPComponent">
- <property name="configuration" ref="jmsConfig" />
+<bean id="amqp" class="org.apache.camel.component.amqp.AMQPComponent">
+ <property name="configuration" ref="jmsConfig" />
</bean>
-<camelContext xmlns="http://camel.apache.org/schema/blueprint" id="simple">
+<camelContext xmlns="http://camel.apache.org/schema/blueprint" id="simple">
<route>
- <from uri="timer:simple?period=5000"/>
+ <from uri="timer:simple?period=5000"/>
<setBody>
<simple>Hello World</simple>
</setBody>
- <to uri="amqp:test"/>
+ <to uri="amqp:test"/>
</route>
</camelContext>
-]]></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()> repo-add camel
-karaf@root()> 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 <strong><code>camel-spring</code></strong> features to define routes in those contexts.</p><p> </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> </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]
+</pre>
+</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 conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: text; gutter: false; theme: Default" data-theme="Default">karaf@root()> repo-add camel
+karaf@root()> feature:install camel-amqp</pre>
+</div></div><p>and the environment would be set.</p><p>Use the <strong><code>camel-blueprint</code></strong> or <strong><code>camel-spring</code></strong> features to define routes in those contexts.</p><p> </p><p> </p><div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><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></div><p> </p><p> </p></div> <div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><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 conf-macro output-block" data-hasbody="true" data-macro-name="info"><p class="title">Prerequisites</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"> </span><div class="confluence-informati
on-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 conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">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&option2=value&...</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 <strong><code>aws-sqs</code></strong> client wants to work with. Only works if Camel creates the <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 <strong><code>S3Constants#BUCKET_NAME</code></strong> and <strong><code>S3Constants#KEY</code></strong> headers, or only the <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 <strong><code>DeleteMessage</code></strong> to the SQS queue if an exchange fails to get through a filter.</p><p>If <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 <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> </span>Multiple names can be separated by comma. <span> </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 <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 <strong><code>WaitTimeSeconds</code></strong> in the request, the queue attribute <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 <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 <strong><code>us-east-1</code></strong> if  <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 <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 <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 <strong><code>amazonSQSClient</code></strong> in
the <a shape="rect" href="registry.html">Registry</a> or your <strong><code>accessKey</code></strong> and <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<String, String></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("myAccessKey", "mySecretKey");
+</pre>
+</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&option2=value&...</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 <strong><code>aws-sqs</code></strong> client wants to work with. Only works if Camel creates the <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 <strong><code>S3Constants#BUCKET_NAME</code></strong> and <strong><code>S3Constants#KEY</code></strong> headers, or only the <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 <strong><code>DeleteMessage</code></strong> to the SQS queue if an exchange fails to get through a filter.</p><p>If <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 <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> </span>Multiple names can be separated by comma. <span> </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 <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 <strong><code>WaitTimeSeconds</code></strong> in the request, the queue attribute <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 <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 <strong><code>us-east-1</code></strong> if  <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 <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 <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 conf-macro output-block" data-hasbody="true" data-macro-name="info"><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 <strong><code>amazonSQSClient</code></strong> in the <a shape="rect" href="registry.html">Registry</a> or your <strong><code>accessKey</code></strong> and <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>Head
er</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></tbody></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<String, String></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 conf-macro output-block" data-hasbody="true" data-macro-name="
code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">AWSCredentials awsCredentials = new BasicAWSCredentials("myAccessKey", "mySecretKey");
ClientConfiguration clientConfiguration = new ClientConfiguration();
-clientConfiguration.setProxyHost("http://myProxyHost");
+clientConfiguration.setProxyHost("http://myProxyHost");
clientConfiguration.setProxyPort(8080);
AmazonSQS client = new AmazonSQSClient(awsCredentials, clientConfiguration);
-registry.bind("client", 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("aws-sqs://MyQueue?amazonSQSClient=#client&delay=5000&maxMessagesPerPoll=5")
- .to("mock:result");
-]]></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: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[<dependency>
+registry.bind("client", client);
+</pre>
+</div></div><p>and refer to it in your Camel aws-sqs component configuration:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("aws-sqs://MyQueue?amazonSQSClient=#client&delay=5000&maxMessagesPerPoll=5")
+ .to("mock:result");
+</pre>
+</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 conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>pom.xml</b></div><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default"><dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws</artifactId>
<version>${camel-version}</version>
</dependency>
-]]></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 <strong><code>DeleteMessage</code></strong> is received. By default, Camel will always send the <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 <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("aws-sqs://MyQueue?amazonSQSClient=#client&defaultVisibilityTimeout=5000&deleteIfFiltered=false")
- .filter("${header.login} == true")
- .to("mock:result");
-]]></script>
-</div></div><p>In the above code, if an exchange doesn't have an appropriate header, it will not make it through the filter AND also not be deleted from the SQS queue. After <code>5000</code> miliseconds, the message will become visible to other consumers.</p><p></p><h3 id="BookComponentAppendix-SeeAlso.1">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 class="alternate"><li><a shape="rect" href="aws.html">AWS Component</a></li></ul> <h2 id="BookComponentAppendix-AtomComponent">Atom Component</h2><p>The <strong>atom:</strong> component is used for polling Atom feeds.</p><p>Camel will poll the feed every 60 seconds by default.<br clear="none"> <strong>Note:</strong> The component currently only supports polling (consuming) feeds.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p><parameter ac:name="">xml</parameter><plain-text-body><dependency>
+</pre>
+</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 <strong><code>DeleteMessage</code></strong> is received. By default, Camel will always send the <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 <strong><code>DeleteMessage</code></strong> even on successful completion of the route, use a Filter:</p><div class="code panel pdl conf-macro output-
block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("aws-sqs://MyQueue?amazonSQSClient=#client&defaultVisibilityTimeout=5000&deleteIfFiltered=false")
+ .filter("${header.login} == true")
+ .to("mock:result");
+</pre>
+</div></div><p>In the above code, if an exchange doesn't have an appropriate header, it will not make it through the filter AND also not be deleted from the SQS queue. After <code>5000</code> miliseconds, the message will become visible to other consumers.</p><p> </p><div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h3 id="BookComponentAppendix-SeeAlso.1">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></div><p> </p><ul class="alternate"><li><a shape="rect" href="aws.html">AWS Component</a></li></ul></div> <div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookComponentAppendix-AtomComponent">Atom Component</h2><p>The <strong>atom:</strong> component is used for polling Atom feeds.</p><p>Camel will poll the feed every 60 seconds by default.<br clear="none"> <strong>Note:</strong> The component currently only supports polling (consuming) feeds.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p><parameter ac:name="">xml</parameter><plain-text-body><dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-atom</artifactId>
<version>x.x.x</version>
@@ -325,91 +325,91 @@ registry.bind("client", client
</dependency>
</plain-text-body><h3 id="BookComponentAppendix-URIformat.2">URI format</h3><plain-text-body>atom://atomUri[?options]
</plain-text-body><p>Where <strong>atomUri</strong> is the URI to the Atom feed to poll.</p><h3 id="BookComponentAppendix-Options.1">Options</h3><parameter ac:name="class">confluenceTableSmall</parameter><rich-text-body><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Property</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>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>splitEntries</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code> Camel will poll the feed and for the subsequent polls return each entry poll by poll. If the feed contains 7 entries then Camel will return the first entry on the first poll, the 2nd entry on the next poll, until no more entries where as Camel will do a ne
w update on the feed. If <code>false</code> then Camel will poll a fresh feed on every invocation.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>filter</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Is only used by the split entries to filter the entries to return. Camel will default use the <code>UpdateDateFilter</code> that only return new entries from the feed. So the client consuming from the feed never receives the same entry more than once. The filter will return the entries ordered by the newest last.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>lastUpdate</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Is only used by the filter, as the starting timestamp for selection never entries (uses the <code>entry.updated</code> timest
amp). Syntax format is: <code>yyyy-MM-ddTHH:MM:ss</code>. Example: <code>2007-12-24T17:45:59</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>throttleEntries</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Sets whether all entries identified in a single feed poll should be delivered immediately. If <code>true</code>, only one entry is processed per <code>consumer.delay</code>. Only applicable when <code>splitEntries</code> is set to <code>true</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>feedHeader</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets whether to add the Abdera Feed object as a header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sortEntries</code></
p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>splitEntries</code> is <code>true</code>, this sets whether to sort those entries by updated date.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>500</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Delay in millis between each poll.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Millis before polling starts.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.userFixedDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" r
owspan="1" class="confluenceTd"><p>If <code>true</code>, use fixed delay between pools, otherwise fixed rate is used. See <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html" rel="nofollow">ScheduledExecutorService</a> in JDK for details.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>username</code></td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> For basic authentication when polling from a HTTP feed</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>password</code></td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong><span> For basic authentication when polling from a HTTP feed</span></td></tr></tbody></table></div></rich-text-body><p>You can append query options to the URI in th
e following format, <code>?option=value&option=value&...</code></p><h3 id="BookComponentAppendix-Exchangedataformat">Exchange data format</h3><p>Camel will set the In body on the returned <code>Exchange</code> with the entries. Depending on the <code>splitEntries</code> flag Camel will either return one <code>Entry</code> or a <code>List<Entry></code>.</p><parameter ac:name="class">confluenceTableSmall</parameter><rich-text-body><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Behavior</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>splitEntries</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Only a single entry from the currently being processed fe
ed is set: <code>exchange.in.body(Entry)</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>splitEntries</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The entire list of entries from the feed is set: <code>exchange.in.body(List<Entry>)</code></p></td></tr></tbody></table></div></rich-text-body><p>Camel can set the <code>Feed</code> object on the In header (see <code>feedHeader</code> option to disable this):</p><h3 id="BookComponentAppendix-MessageHeaders">Message Headers</h3><p>Camel atom uses these headers.</p><parameter ac:name="class">confluenceTableSmall</parameter><rich-text-body><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>CamelAtomFeed</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>When consuming the <code>org.apache.abdera.model.Feed</code> object is set to this header.</p></td></tr></tbody></table></div></rich-text-body><h3 id="BookComponentAppendix-Samples">Samples</h3><p>In this sample we poll James Strachan's blog.</p><plain-text-body>from("atom://http://macstrac.blogspot.com/feeds/posts/default").to("seda:feeds");
-</plain-text-body><p>In this sample we want to filter only good blogs we like to a SEDA queue. The sample also shows how to setup Camel standalone, not running in any Container or using Spring.<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomGoodBlogsTest.java}</plain-text-body><parameter ac:name=""><a shape="rect" href="endpoint-see-also.html">Endpoint See Also</a></parameter></p><ul class="alternate"><li><a shape="rect" href="rss.html">RSS</a></li></ul> <h2 id="BookComponentAppendix-BeanComponent">Bean Component</h2><p>The <strong>bean:</strong> component binds beans to Camel message exchanges.</p><h3 id="BookComponentAppendix-URIformat.3">URI format</h3><p>bean:beanID[?options]</p><p>Where <strong>beanID</strong> can be any string which is used to look up the bean in the <a shape="rect" href="registry.html">Registry</a></p><h3 id="BookComponentAppendix-Options.2">Options</h3><p>confluenceTableSmall</
p><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 from the bean that will be invoked. If not provided, Camel will try to determine the method itself. In case of ambiguity an exception will be thrown. See <a shape="rect" href="bean-binding.html">Bean Binding</a> for more details. From <strong>Camel 2.8</strong> onwards you can specify type qualifiers to pin-point the exact method to use for o
verloaded methods. From <strong>Camel 2.9</strong> onwards you can specify parameter values directly in the method syntax. See more details at <a shape="rect" href="bean-binding.html">Bean Binding</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cache</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>If enabled, Camel will cache the result of the first <a shape="rect" href="registry.html">Registry</a> look-up. Cache can be enabled if the bean in the <a shape="rect" href="registry.html">Registry</a> is defined as a singleton scope.</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>fal
se</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>bean.xxx</p></td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.42857;">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.foo=123.</p></td></tr></tbody></table></div><p>You can append query options to the URI in the following format, <code>?option=value&option=value&...</code></p><h3 id="BookComponentAppendix-Using">Using</h3><p>The object instance that is used to consume messages must be explicitly registered with the
<a shape="rect" href="registry.html">Registry</a>. For example, if you are using Spring you must define the bean in the Spring configuration, <code>spring.xml</code>; or if you don't use Spring, by registering the bean in JNDI.</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 populate the context with the services we need
+</plain-text-body><p>In this sample we want to filter only good blogs we like to a SEDA queue. The sample also shows how to setup Camel standalone, not running in any Container or using Spring.<plain-text-body>{snippet:id=e1|lang=java|url=camel/trunk/components/camel-atom/src/test/java/org/apache/camel/component/atom/AtomGoodBlogsTest.java}</plain-text-body><parameter ac:name=""><a shape="rect" href="endpoint-see-also.html">Endpoint See Also</a></parameter></p><ul class="alternate"><li><a shape="rect" href="rss.html">RSS</a></li></ul></div> <div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookComponentAppendix-BeanComponent">Bean Component</h2><p>The <strong>bean:</strong> component binds beans to Camel message exchanges.</p><h3 id="BookComponentAppendix-URIformat.3">URI format</h3><p>bean:beanID[?options]</p><p>Where <strong>beanID</strong> can be any string which is used to look up the bean in the <a shape="rect" href="registry.html">Regi
stry</a></p><h3 id="BookComponentAppendix-Options.2">Options</h3><p>confluenceTableSmall</p><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 from the bean that will be invoked. If not provided, Camel will try to determine the method itself. In case of ambiguity an exception will be thrown. See <a shape="rect" href="bean-binding.html">Bean Binding</a> for more details. From <strong>Camel 2.8</
strong> onwards you can specify type qualifiers to pin-point the exact method to use for overloaded methods. From <strong>Camel 2.9</strong> onwards you can specify parameter values directly in the method syntax. See more details at <a shape="rect" href="bean-binding.html">Bean Binding</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cache</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>If enabled, Camel will cache the result of the first <a shape="rect" href="registry.html">Registry</a> look-up. Cache can be enabled if the bean in the <a shape="rect" href="registry.html">Registry</a> is defined as a singleton scope.</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>bean.xxx</p></td><td colspan="1" rowspan="1" class="confluenceTd"> </td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong style="line-height: 1.42857;">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.foo=123.</p></td></tr></tbody></table></div><p>You can append query options to the URI in the following format, <code>?option=value&option=value&...</code></p><h3 id="BookComponentAppendix-Using">Using</h3><p>Th
e object instance that is used to consume messages must be explicitly registered with the <a shape="rect" href="registry.html">Registry</a>. For example, if you are using Spring you must define the bean in the Spring configuration, <code>spring.xml</code>; or if you don't use Spring, by registering the bean in JNDI.</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">// lets populate the context with the services we need
// note that we could just use a spring.xml file to avoid this step
JndiContext context = new JndiContext();
-context.bind("bye", new SayService("Good Bye!"));
+context.bind("bye", new SayService("Good Bye!"));
-CamelContext camelContext = new DefaultCamelContext(context);]]></script>
-</div></div><p>{snippet:id=register|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java}</p><p>Once an endpoint has been registered, you can build Camel routes that use it to process exchanges.</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[camelContext.addRoutes(new RouteBuilder() {
+CamelContext camelContext = new DefaultCamelContext(context);</pre>
+</div></div><p>{snippet:id=register|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/component/pojo/PojoRouteTest.java}</p><p>Once an endpoint has been registered, you can build Camel routes that use it to process exchanges.</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">camelContext.addRoutes(new RouteBuilder() {
public void configure() {
[... 6381 lines stripped ...]