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 2016/05/24 10:19:41 UTC

svn commit: r989024 [2/4] - in /websites/production/camel/content: book-architecture.html book-component-appendix.html book-in-one-page.html cache/main.pageCache component-list.html component.html components.html telegram.html transport.html uris.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 Tue May 24 10:19:41 2016
@@ -1017,11 +1017,11 @@ template.send("direct:alias-verify&
 ]]></script>
 </div></div><p></p><h3 id="BookComponentAppendix-SeeAlso.8">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul><ul><li><a shape="rect" href="crypto.html">Crypto</a> Crypto is also available as a <a shape="rect" href="data-format.html">Data Format</a></li></ul> <h2 id="BookComponentAppendix-CXFComponent">CXF Component</h2><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>When using CXF as a consumer, the <a shape="rect" href="cxf-bean-component.html">CXF Bean Component</a> allows you to factor out how message payloads are received from their processing as a RESTful or SOAP web service. This has the potential of using a multitude of transports to cons
 ume web services. The bean component's configuration is also simpler and provides the fastest method to implement web services using Camel and CXF.</p></div></div><div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>When using CXF in streaming modes (see DataFormat option), then also read about <a shape="rect" href="stream-caching.html">Stream caching</a>.</p></div></div><p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1463689259148 {padding: 0px;}
-div.rbtoc1463689259148 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1463689259148 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1464085061807 {padding: 0px;}
+div.rbtoc1464085061807 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1464085061807 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1463689259148">
+/*]]>*/</style></p><div class="toc-macro rbtoc1464085061807">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookComponentAppendix-CXFComponent">CXF Component</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookComponentAppendix-URIformat">URI format</a></li><li><a shape="rect" href="#BookComponentAppendix-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookComponentAppendix-Thedescriptionsofthedataformats">The descriptions of the dataformats</a>
@@ -8467,7 +8467,7 @@ ref:someName[?options]
 from(&quot;restlet:http://localhost:&quot; + port + &quot;/securedOrders?restletMethod=post&amp;restletRealm=#realm&quot;).process(new Processor() {
     public void process(Exchange exchange) throws Exception {
         exchange.getOut().setBody(
-                &quot;received [&quot; + exchange.getIn().getBody()
+                &quot;received [&quot; + exchange.getIn().getBody(String.class)
                 + &quot;] as an order id = &quot;
                 + exchange.getIn().getHeader(&quot;id&quot;));
     }
@@ -8494,6 +8494,7 @@ final String id = &quot;89531&quot;;
 Map&lt;String, Object&gt; headers = new HashMap&lt;String, Object&gt;();
 headers.put(RestletConstants.RESTLET_LOGIN, &quot;admin&quot;);
 headers.put(RestletConstants.RESTLET_PASSWORD, &quot;foo&quot;);
+headers.put(Exchange.CONTENT_TYPE, MediaType.APPLICATION_XML);
 headers.put(&quot;id&quot;, id);
 
 String response = template.requestBodyAndHeaders(
@@ -9092,7 +9093,7 @@ protected RouteBuilder createRouteBuilde
 &lt;/dependency&gt;
 ]]></script>
 </div></div><h3 id="BookComponentAppendix-SMSlimitations">SMS limitations</h3><p>SMS is neither reliable or secure.&#160; Users who require reliable and secure delivery may want to consider using the XMPP or SIP components instead, combined with a smartphone app supporting the chosen protocol.</p><ul><li>Reliability: although the SMPP standard offers a range of feedback mechanisms to indicate errors, non-delivery and confirmation of delivery it is not uncommon for mobile networks to hide or simulate these responses.&#160; For example, some networks automatically send a delivery confirmation for every message even if the destination number is invalid or not switched on.&#160; Some networks silently drop messages if they think they are spam.&#160; Spam detection rules in the network may be very crude, sometimes more than 100 messages per day from a single sender may be considered spam.</li><li>Security: there is basic encryption for the last hop from the radio tower down to the recipi
 ent handset.&#160; SMS messages are not encrypted or authenticated in any other part of the network.&#160; Some operators allow staff in retail outlets or call centres to browse through the SMS message histories of their customers.&#160; Message sender identity can be easily forged.&#160; Regulators and even the mobile telephone industry itself has cautioned against the use of SMS in two-factor authentication schemes and other purposes where security is important.</li></ul><p>While the Camel component makes it as easy as possible to send messages to the SMS network, it can not offer an easy solution to these problems.</p><h2 id="BookComponentAppendix-Datacoding,alphabetandinternationalcharactersets">Data coding, alphabet and international character sets</h2><p>Data coding and alphabet can be specified on a per-message basis.&#160; Default values can be specified for the endpoint.&#160; It is important to understand the relationship between these options and the way the component act
 s when more than one value is set.</p><p>Data coding is an 8 bit field in the SMPP wire format.</p><p>Alphabet corresponds to bits 0-3 of the data coding field.&#160; For some types of message, where a message class is used (by setting bit 5 of the data coding field), the lower two bits of the data coding field are not interpreted as alphabet and only bits 2 and 3 impact the alphabet.</p><p>Furthermore, current version of the JSMPP library only seems to support bits 2 and 3, assuming that bits 0 and 1 are used for message class.&#160; This is why the Alphabet class in JSMPP doesn't support the value 3 (binary 0011) which indicates ISO-8859-1.</p><p>Although JSMPP provides a representation of the message class parameter, the Camel component doesn't currently provide a way to set it other than manually setting the corresponding bits in the data coding field.</p><p>When setting the data coding field in the outgoing message, the Camel component considers the following values and uses th
 e first one it can find:</p><ul><li>the data coding specified in a header</li><li>the alphabet specified in a header</li><li>the data coding specified in the endpoint configuration (URI parameter)</li></ul><p>Older versions of Camel had bugs in support for international character sets.&#160; This feature only worked when a single encoding was used for all messages and was troublesome when users wanted to change it on a per-message basis.&#160; Users who require this to work should ensure their version of Camel includes the fix for&#160;</p><div class="aui-message warning jim-inline-block">
-    <span class="aui-icon icon-warning"></span>JIRA Issues Macro: com.atlassian.sal.api.net.ResponseStatusException: Unexpected response received. Status code: 404
+    <span class="aui-icon icon-warning"></span>JIRA Issues Macro: com.atlassian.sal.api.net.ResponseException: java.net.SocketTimeoutException: connect timed out
 </div>
 .<p>In addition to trying to send the data coding value to the SMSC, the Camel component also tries to analyze the message body, convert it to a Java String (Unicode) and convert that to a byte array in the corresponding alphabet&#160; When deciding which alphabet to use in the byte array, the Camel SMPP component does not consider the data coding value (header or configuration), it only considers the specified alphabet (from either the header or endpoint parameter).</p><p>If some characters in the String can't be represented in the chosen alphabet, they may be replaced by the question mark ( ? ) symbol.&#160; Users of the API may want to consider checking if their message body can be converted to ISO-8859-1 before passing it to the component and if not, setting the alphabet header to request UCS-2 encoding.&#160; If the alphabet and data coding options are not specified at all then the component may try to detect the required encoding and set the data coding for you.</p><p>The list
  of alphabet codes are specified in the SMPP specification v3.4, section 5.2.19.&#160; One notable limitation of the SMPP specification is that there is no alphabet code for explicitly requesting use of the GSM 3.38 (7 bit) character set.&#160; Choosing the value 0 for the alphabet selects the SMSC <em>default</em> alphabet, this usually means GSM 3.38 but it is not guaranteed.&#160; The SMPP gateway Nexmo <a shape="rect" class="external-link" href="https://help.nexmo.com/hc/en-us/articles/204015813-How-to-change-the-character-encoding-in-SMPP-" rel="nofollow">actually allows the default to be mapped to any other character set with a control panel option</a>. It is suggested that users check with their SMSC operator to confirm exactly which character set is being used as the default.</p><h3 id="BookComponentAppendix-Messagesplittingandthrottling">Message splitting and throttling</h3><p>After transforming a message body from a String to a byte array, the Camel component is also respo
 nsible for splitting the message into parts (within the 140 byte SMS size limit) before passing it to JSMPP.&#160; This is completed automatically.</p><p>If the GSM 3.38 alphabet is used, the component will pack up to 160 characters into the 140 byte message body.&#160; If an 8 bit character set is used (e.g. ISO-8859-1 for western Europe) then 140 characters will be allowed within the 140 byte message body.&#160; If 16 bit UCS-2 encoding is used then just 70 characters fit into each 140 byte message.</p><p>Some SMSC providers implement throttling rules.&#160; Each part of a message that has been split may be counted separately by the provider's throttling mechanism.&#160; The Camel Throttler component can be useful for throttling messages in the SMPP route before handing them to the SMSC.</p><h3 id="BookComponentAppendix-URIformat.61">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[smpp://[username@]hostname[:port][?options]
@@ -9923,7 +9924,59 @@ template.requestBodyAndHeader(&quot;dire
 </div></div><p>&lt;bean id="lobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler"&gt; &lt;property name="nativeJdbcExtractor" ref="nativeJdbcExtractor"/&gt; &lt;/bean&gt; &lt;bean id="nativeJdbcExtractor" class="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"/&gt; &lt;bean id="repo" class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"&gt; &lt;property name="transactionManager" ref="transactionManager"/&gt; &lt;property name="repositoryName" value="aggregation"/&gt; &lt;property name="dataSource" ref="dataSource"/&gt; &lt;!-- Only with Oracle, else use default --&gt; &lt;property name="lobHandler" ref="lobHandler"/&gt; &lt;/bean&gt;</p><p>&#160;</p><p>Optimistic locking</p><p>From <strong>Camel 2.12</strong> onwards you can turn on <code>optimisticLocking</code> and use this JDBC based aggregation repository in a clustered environment where multiple Camel applications shared the same database for the aggregation r
 epository. If there is a race condition there JDBC driver will throw a vendor specific exception which the <code>JdbcAggregationRepository</code> can react upon. To know which caused exceptions from the JDBC driver is regarded as an optimistick locking error we need a mapper to do this. Therefore there is a <code>org.apache.camel.processor.aggregate.jdbc.JdbcOptimisticLockingExceptionMapper</code> allows you to implement your custom logic if needed. There is a default implementation <code>org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper</code> which works as follows:</p><p>The following check is done:</p><p>If the caused exception is an <code>SQLException</code> then the SQLState is checked if starts with 23.</p><p>If the caused exception is a <code>DataIntegrityViolationException</code></p><p>If the caused exception class name has "ConstraintViolation" in its name.</p><p>optional checking for FQN class name matches if any class names has been co
 nfigured</p><p>You can in addition add FQN classnames, and if any of the caused exception (or any nested) equals any of the FQN class names, then its an optimistick locking error.</p><p>Here is an example, where we define 2 extra FQN class names from the JDBC vendor.</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[ ]]></script>
 </div></div><p>&lt;bean id="repo" class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository"&gt; &lt;property name="transactionManager" ref="transactionManager"/&gt; &lt;property name="repositoryName" value="aggregation"/&gt; &lt;property name="dataSource" ref="dataSource"/&gt; &lt;property name"jdbcOptimisticLockingExceptionMapper" ref="myExceptionMapper"/&gt; &lt;/bean&gt; &lt;!-- use the default mapper with extra FQN class names from our JDBC driver --&gt; &lt;bean id="myExceptionMapper" class="org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper"&gt; &lt;property name="classNames"&gt; &lt;util:set&gt; &lt;value&gt;com.foo.sql.MyViolationExceptoion&lt;/value&gt; &lt;value&gt;com.foo.sql.MyOtherViolationExceptoion&lt;/value&gt; &lt;/util:set&gt; &lt;/property&gt; &lt;/bean&gt;</p><p>&#160;</p><p></p><h3 id="BookComponentAppendix-SeeAlso.63">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><a shape="rect" href="sql-stored-procedure.html">SQL Stored Procedure</a></p><p><a shape="rect" href="jdbc.html">JDBC</a></p> <h2 id="BookComponentAppendix-TestComponent">Test 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 <strong>test</strong> component extends the <a shape="rect" href="mock.html">Mock</a> component to support pulling messages from another endpoint on startup to set the expected message bodies on the underlying <a shape="rect" href="mock.html">Mock</a> endpoint. That is, you use the test endpoint in a route and messages arriving on it will be implicitly compared to some expected messages extracted from some other location.</p><p>So you can use, for example, an expected set of message bodies as files. This will then set up a properly configured <a shape="rect" href="mock.html">Mock</a> endpoint, which is only valid if the received messages match the number of expected messages and their message payloads are equal.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component when us
 ing <strong>Camel 2.8</strong> or older:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<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><a shape="rect" href="sql-stored-procedure.html">SQL Stored Procedure</a></p><p><a shape="rect" href="jdbc.html">JDBC</a></p> <h2 id="BookComponentAppendix-TelegramComponent">Telegram Component</h2><p><strong>Available as of Camel 2.18</strong></p><p>The <strong>Telegram</strong> component provides access to the <a shape="rect" class="external-link" href="https://core.telegram.org/bots/api" rel="nofollow">Telegram Bot API</a>. It allows a Camel-based application to send and receive messages by acting as a Bot, participating in direct conversations with normal users, private and public groups or channels.</p><p>A Telegram Bot must be created before using this component, following the instructions at the <a shap
 e="rect" class="external-link" href="https://core.telegram.org/bots#3-how-do-i-create-a-bot" rel="nofollow">Telegram Bot developers home</a>. When a new Bot is created, the BotFather provides an <strong>authorization token</strong> corresponding to the Bot. The authorization token is a mandatory parameter for the camel-telegram endpoint.</p><div class="confluence-information-macro confluence-information-macro-note"><p class="title">Note</p><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p><span>In order to allow the Bot to receive all messages exchanged within a group or channel (not just the ones starting with a '/' character), ask the BotFather to </span><strong>disable the privacy mode</strong><span>, using the </span><strong>/setprivacy</strong><span> command.</span></p></div></div><p>Maven users will need to add the following dependency to their pom.xml for this component:</p><di
 v 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;
+    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+    &lt;artifactId&gt;camel-telegram&lt;/artifactId&gt;
+    &lt;version&gt;x.x.x&lt;/version&gt;
+    &lt;!-- use the same version as your Camel core version --&gt;
+&lt;/dependency&gt;]]></script>
+</div></div><h3 id="BookComponentAppendix-URIformat.69">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[telegram:type/authorizationToken[?options]]]></script>
+</div></div><h3 id="BookComponentAppendix-Options.55">Options</h3><p>The Telegram component has no options.</p><p>The Telegram component supports 24 endpoint options which are listed below:</p><div class="confluenceTableSmall"><div><div class="sect2"><div class="sect3"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Group</th><th colspan="1" rowspan="1" class="confluenceTh">Default</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>type</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">common</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>Required</strong> The endpoint type. Currently only the 'bots' type is supported.</
 p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>authorizationToken</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">common</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>Required</strong> The authorization token for using the bot (ask the BotFather) eg. 654321531:HGF_dTra456323dHuOedsE343211fqr3t-H.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>bridgeErrorHandler</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">consumer</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer
  is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>limit</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">consumer</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>100</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Limit on the number of updates that can be received in a single polling request.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>sendEmptyMessageWhenIdle</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">consumer</p></td><td colspan="1" rowspan="1" class="
 confluenceTd"><p class="tableblock"><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">If the polling consumer did not poll any files you can enable this option to send an empty message (no body) instead.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>timeout</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">consumer</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>30</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Timeout in seconds for long polling. Put 0 for short polling or a bigger number for long polling. Long polling produces shorter response time.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>exceptionHandler</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">consumer (advanced)</p></t
 d><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>pollStrategy</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">consumer (advanced)</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.</p></td></tr><tr><td colsp
 an="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>chatId</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">producer</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">The identifier of the chat that will receive the produced messages. Chat ids can be first obtained from incoming messages (eg. when a telegram user starts a conversation with a bot its client sends automatically a '/start' message containing the chat id). It is an optional parameter as the chat id can be set dynamically for each outgoing message (using body or headers).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>exchangePattern</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">advanced</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>InOnly</code></p>
 </td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Sets the default exchange pattern when creating an exchange</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>synchronous</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">advanced</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>backoffErrorThreshold</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tablebloc
 k">The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>backoffIdleThreshold</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>backoffMultiplier</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To let the scheduled polling consumer backoff if there has been a 
 number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>delay</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>500</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Milliseconds before the next poll. You can also specify time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30 seconds) and 1h (1 hour).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>greedy</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler<
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">If greedy is enabled then the ScheduledPollConsumer will run immediately again if the previous run polled 1 or more messages.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>initialDelay</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Milliseconds before the first poll starts. You can also specify time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30 seconds) and 1h (1 hour).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>runLoggingLevel</strong></p></td><td colspan="1" row
 span="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>TRACE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>scheduledExecutorService</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>scheduler</strong></p></td><td colspan=
 "1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>none</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To use a cron scheduler from either camel-spring or camel-quartz2 component</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>schedulerProperties</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To configure additional properties when using a custom scheduler or any of the Quartz2 Spring based scheduler.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>startScheduler</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p>
 </td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Whether the scheduler should be auto started.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>timeUnit</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>ms</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">Time unit for initialDelay and delay options.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><strong>useFixedDelay</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">scheduler</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>true</code></p></td><td colspan="1" rowspan="1" class="conflue
 nceTd"><p class="tableblock">Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details.</p></td></tr></tbody></table></div></div></div></div></div><h3 id="BookComponentAppendix-MessageHeaders.18">Message Headers</h3><div class="confluenceTableSmall"><div class="sect2"><div class="sect3"><div><div class="sect2"><div class="sect3"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>CamelTelegramChatId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">This header is used by the producer endpoint in order to resolve the chat id that will receive the message. The recipient chat id can be placed (in order of priority) in message body, in the <code>CamelTelegramChatId</code> header or in the endpoin
 t configuration (<code>chatId</code> option). This header is also present in all incoming messages.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>CamelTelegramMediaType</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">This header is used to identify the media type when the outgoing message is composed of pure binary data. Possible values are strings or enum values belonging to the <code>org.apache.camel.component.telegram.TelegramMediaType</code> enumeration.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>CamelTelegramMediaTitleCaption</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">This header is used to provide a caption or title for outgoing binary messages.</p></td></tr></tbody></table></div></div></div></div></div></div></div><h3 id="BookComponentAppendix-Usage.9">Usage</h3><div><div class="sect2"><div class="s
 ect3"><div class="paragraph"><p>The Telegram component supports both consumer and producer endpoints. It can also be used in <strong style="line-height: 1.42857;">reactive chat-bot mode</strong> (to consume, then produce messages).</p><h4 id="BookComponentAppendix-ProducerExample.1">Producer Example</h4><div><div class="sect2"><div class="sect3"><div class="paragraph"><p>The following is a basic example of how to send a message to a Telegram chat through the Telegram Bot API.</p><p>in Java DSL</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;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;);]]></script>
+</div></div><p>or in Spring XML</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
+    &lt;from uri=&quot;direct:start&quot;/&gt;
+    &lt;to uri=&quot;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;/&gt;
+&lt;/route&gt;]]></script>
+</div></div><div><div class="sect2"><div class="sect3"><div class="paragraph"><p>The code <em><code style="line-height: 1.42857;">123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L</code></em> is the <strong style="line-height: 1.42857;">authorization token</strong> corresponding to the Bot.</p><p>When using the producer endpoint without specifying the <strong>chat id</strong> option, the target chat will be identified using information contained in the body or headers of the message. The following message bodies are allowed for a producer endpoint (messages of type <em>OutgoingXXXMessage</em> belong to the package&#160;<em>org.apache.camel.component.telegram.model</em>)</p><div class="confluenceTableSmall"><div class="sect2"><div class="sect3"><div class="sect2"><div class="sect3"><div><div class="sect2"><div class="sect3"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Java T
 ype</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>OutgoingTextMessage</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To send a text message to a chat</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>OutgoingPhotoMessage</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To send a photo (JPG, PNG) to a chat</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>OutgoingAudioMessage</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To send a mp3 audio to a chat</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>OutgoingVideoMessage</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To send a mp4 video to a chat
 </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>byte[]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To send any media type supported. It requires the <code>CamelTelegramMediaType</code> header to be set to the appropriate media type</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To send a text message to a chat. It gets converted automatically into a <code>OutgoingTextMessage</code></p></td></tr></tbody></table></div></div></div></div></div></div></div></div></div><h4 id="BookComponentAppendix-ConsumerExample.1">Consumer Example</h4></div></div></div></div><p>The following is a basic example of how to receive all messages that telegram users are sending to the configured Bot.</p><p>In Java DSL</p><div class="code panel pdl" style="border-width: 1px;"><div cla
 ss="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;)
+.bean(ProcessorBean.class)]]></script>
+</div></div><p>or in Spring XML</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
+    &lt;from uri=&quot;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;/&gt;
+    &lt;bean ref=&quot;myBean&quot; /&gt;
+&lt;/route&gt;
+&lt;bean id=&quot;myBean&quot; class=&quot;com.example.MyBean&quot;/&gt;]]></script>
+</div></div><p>The<em style="line-height: 1.42857;"> MyBean</em> is a simple bean that will receive the messages</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[public class MyBean {
+    public void process(String message) {
+        // or Exchange, or org.apache.camel.component.telegram.model.IncomingMessage (or both)
+        // do process
+    }
+}]]></script>
+</div></div><p>Supported types for incoming messages are</p><div class="confluenceTableSmall"><div class="sect2"><div class="sect3"><div class="sect2"><div class="sect3"><div class="sect2"><div class="sect3"><div><div class="sect2"><div class="sect3"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Java Type</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>IncomingMessage</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">The full object representation of an incoming message</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock"><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">The content of the message, for text messages only</p></td></tr></tbody></table></div></div></div></div></div></div></div><
 /div></div></div></div><h4 id="BookComponentAppendix-ReactiveChat-BotExample">Reactive Chat-Bot Example</h4><p>The reactive chat-bot mode is a simple way of using the Camel component to build a simple chat bot that replies directly to chat messages received from the Telegram users.</p><p>The following is a basic configuration of the chat-bot in Java DSL</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;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;)
+.bean(ChatBotLogic.class)
+.to(&quot;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;);]]></script>
+</div></div><p>or in Spring XML</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;route&gt;
+    &lt;from uri=&quot;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;/&gt;
+    &lt;bean ref=&quot;chatBotLogic&quot; /&gt;
+    &lt;to uri=&quot;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;/&gt;
+&lt;/route&gt;
+&lt;bean id=&quot;chatBotLogic&quot; class=&quot;com.example.ChatBotLogic&quot;/&gt;]]></script>
+</div></div><p>The ChatBotLogic is a simple bean that implements a generic String-to-String 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[public class ChatBotLogic {
+    public String chatBotProcess(String message) {
+        if( &quot;do-not-reply&quot;.equals(message) ) {
+            return null; // no response in the chat
+        }
+        return &quot;echo from the bot: &quot; + message; // echoes the message
+    }
+}]]></script>
+</div></div><p>Every non-null string returned by the <em style="line-height: 1.42857;">chatBotProcess</em> method is automatically routed to the chat that originated the request (as the <em style="line-height: 1.42857;">CamelTelegramChatId</em> header is used to route the message).</p></div></div></div></div></div></div></div></div> <h2 id="BookComponentAppendix-TestComponent">Test 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 <strong>test</strong> component extends the <a shape="rect" href="mock.html">Mock</a> component to support pulling messages from another endpoint on startup to set the expected message bodies on the underlying <a shape="rect" href="mock.html">Mock</a> endpoint. That is, you use the test endpoint in a route and messages arriving on it will be implicitly compared to some expected messages extracted from some other location.</p><p>So you can use, for example, an expected set of message bodies as files. This will then set up a properly configured <a shape="rect" href="mock.html">Mock</a> endpoint, which is only valid if the received messages match the number of expected messages and their message payloads are equal.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component when using <strong>Camel 2.8</strong> or older:</p><div class="code panel pd
 l" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-spring&lt;/artifactId&gt;
@@ -9931,7 +9984,7 @@ template.requestBodyAndHeader(&quot;dire
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div><p>From Camel 2.9 onwards the <a shape="rect" href="test.html">Test</a> component is provided directly in the camel-core.</p><h3 id="BookComponentAppendix-URIformat.69">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>From Camel 2.9 onwards the <a shape="rect" href="test.html">Test</a> component is provided directly in the camel-core.</p><h3 id="BookComponentAppendix-URIformat.70">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[test:expectedMessagesEndpointUri
 ]]></script>
 </div></div><p>Where <strong>expectedMessagesEndpointUri</strong> refers to some other <a shape="rect" href="component.html">Component</a> URI that the expected message bodies are pulled from before starting the test.</p><h3 id="BookComponentAppendix-URIOptions.10">URI Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>timeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>2000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12:</strong> The timeout to use when polling for message bodies from the URI.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">anyOrder</td><td colspan
 ="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.17:</strong> Whether the expected messages should arrive in the same order or can be in any order.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">split</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.17:</strong> If enabled the the messages loaded from the test endpoint will be split using \n\r delimiters (new lines) so each line is an expected message.<br clear="none">For example to use a file endpoint to load a file where each line is an expected message.&#160;</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delimiter</td><td colspan="1" rowspan="1" class="confluenceTd">\n|\r</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.17:</strong> The split delimiter to use when split is enabled. By default the delimiter is new line based. The delimiter 
 can be a regular expression.</td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-Example.10">Example</h3><p>For example, you could write a test case as follows:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -9939,10 +9992,10 @@ template.requestBodyAndHeader(&quot;dire
   to(&quot;test:file://data/expectedOutput?noop=true&quot;);
 ]]></script>
 </div></div><p>If your test then invokes the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/component/mock/MockEndpoint.html#assertIsSatisfied(org.apache.camel.CamelContext)">MockEndpoint.assertIsSatisfied(camelContext) method</a>, your test case will perform the necessary assertions.</p><p>To see how you can set other expectations on the test endpoint, see the <a shape="rect" href="mock.html">Mock</a> component.</p><p></p><h3 id="BookComponentAppendix-SeeAlso.64">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="spring-testing.html">Spring Testing</a></li></ul> <h2 id="BookComponentAppendix-TimerComponent">Timer Component</h2><p>The <strong>timer:</strong> component is used to generate message exchanges when a timer fires You can only consume events from this endpoint.</p><h3 id="BookComponentAppendix-URIformat.70">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<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="spring-testing.html">Spring Testing</a></li></ul> <h2 id="BookComponentAppendix-TimerComponent">Timer Component</h2><p>The <strong>timer:</strong> component is used to generate message exchanges when a timer fires You can only consume events from this endpoint.</p><h3 id="BookComponentAppendix-URIformat.71">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[timer:name[?options]
 ]]></script>
-</div></div><p>Where <code>name</code> is the name of the <code>Timer</code> object, which is created and shared across endpoints. So if you use the same name for all your timer endpoints, only one <code>Timer</code> object and thread will be used.</p><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><p><strong>Note:</strong> The IN body of the generated exchange is <code>null</code>. So <code>exchange.getIn().getBody()</code> returns <code>null</code>.</p><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Advanced Scheduler</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>See also the <a shape="rect" href="quartz.html">Quartz</a> component that supports much more advanced scheduling.</p></div></div><div class="confluence-information-macro confluence-information-macro-
 tip"><p class="title">Specify time in human friendly format</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>In <strong>Camel 2.3</strong> onwards you can specify the time in <a shape="rect" href="how-do-i-specify-time-period-in-a-human-friendly-syntax.html">human friendly syntax</a>.</p></div></div><h3 id="BookComponentAppendix-Options.55">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>time</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A <code>ja
 va.util.Date</code> the <strong>first</strong> event should be generated. If using the URI, the pattern expected is: <code>yyyy-MM-dd HH:mm:ss</code> or <code>yyyy-MM-dd'T'HH:mm:ss</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>pattern</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows you to specify a custom <code>Date</code> pattern to use for setting the time option using URI syntax.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>period</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If greater than 0, generate periodic events every <code>period</code> milliseconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>delay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style
 ="font-family: monospace;">0</span> / <code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of milliseconds to wait before the first event is generated. Should not be used in conjunction with the <code>time</code> option. The default value has been changed to <code>1000</code> from <strong>Camel 2.11</strong> onwards. In older releases the default value is <code>0</code>.</p><p>From<strong> Camel 2.17 </strong>is possible to specify a negative delay. In this scenario the timer will generate and fire events as soon as possible.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>fixedRate</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events take place at approximately regular intervals, separated by the specified period.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>daemon</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 or not the thread associated with the timer endpoint runs as a daemon.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>repeatCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Specifies a maximum limit of number of fires. So if you set it to 1, the timer will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever.</p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-ExchangeProperties">Exchange Properties</h3><p>When the timer is fired, it adds the following information as properties to the <code>Exchange</code>:</p><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>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_NAME</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 value of the <code>name</code> option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_TIME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Date</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The value of the <code>time</code> option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_PERIOD</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>long</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The 
 value of the <code>period</code> option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_FIRED_TIME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Date</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The time when the consumer fired.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_COUNTER</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Long</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> The current fire counter. Starts from 1.</p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-MessageHeaders.18">Message Headers</h3><p>When the timer is fired, it adds the following information as headers to the IN message</p><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>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_FIRED_TIME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>java.util.Date</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The time when the consumer fired</p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-Sample.5">Sample</h3><p>To set up a route that generates an event every 60 seconds:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Where <code>name</code> is the name of the <code>Timer</code> object, which is created and shared across endpoints. So if you use the same name for all your timer endpoints, only one <code>Timer</code> object and thread will be used.</p><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><p><strong>Note:</strong> The IN body of the generated exchange is <code>null</code>. So <code>exchange.getIn().getBody()</code> returns <code>null</code>.</p><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Advanced Scheduler</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>See also the <a shape="rect" href="quartz.html">Quartz</a> component that supports much more advanced scheduling.</p></div></div><div class="confluence-information-macro confluence-information-macro-
 tip"><p class="title">Specify time in human friendly format</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>In <strong>Camel 2.3</strong> onwards you can specify the time in <a shape="rect" href="how-do-i-specify-time-period-in-a-human-friendly-syntax.html">human friendly syntax</a>.</p></div></div><h3 id="BookComponentAppendix-Options.56">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>time</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A <code>ja
 va.util.Date</code> the <strong>first</strong> event should be generated. If using the URI, the pattern expected is: <code>yyyy-MM-dd HH:mm:ss</code> or <code>yyyy-MM-dd'T'HH:mm:ss</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>pattern</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows you to specify a custom <code>Date</code> pattern to use for setting the time option using URI syntax.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>period</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If greater than 0, generate periodic events every <code>period</code> milliseconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>delay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style
 ="font-family: monospace;">0</span> / <code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of milliseconds to wait before the first event is generated. Should not be used in conjunction with the <code>time</code> option. The default value has been changed to <code>1000</code> from <strong>Camel 2.11</strong> onwards. In older releases the default value is <code>0</code>.</p><p>From<strong> Camel 2.17 </strong>is possible to specify a negative delay. In this scenario the timer will generate and fire events as soon as possible.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>fixedRate</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Events take place at approximately regular intervals, separated by the specified period.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>daemon</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 or not the thread associated with the timer endpoint runs as a daemon.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>repeatCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Specifies a maximum limit of number of fires. So if you set it to 1, the timer will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever.</p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-ExchangeProperties">Exchange Properties</h3><p>When the timer is fired, it adds the following information as properties to the <code>Exchange</code>:</p><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>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_NAME</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 value of the <code>name</code> option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_TIME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Date</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The value of the <code>time</code> option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_PERIOD</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>long</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The 
 value of the <code>period</code> option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_FIRED_TIME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Date</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The time when the consumer fired.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_COUNTER</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Long</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> The current fire counter. Starts from 1.</p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-MessageHeaders.19">Message Headers</h3><p>When the timer is fired, it adds the following information as headers to the IN message</p><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>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_FIRED_TIME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>java.util.Date</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The time when the consumer fired</p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-Sample.5">Sample</h3><p>To set up a route that generates an event every 60 seconds:</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;timer://foo?fixedRate=true&amp;period=60000&quot;).to(&quot;bean:myBean?method=someMethodName&quot;);
 ]]></script>
 </div></div><div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Instead of 60000 you can use period=60s which is more friendly to read.</p></div></div><p>The above route will generate an event and then invoke the <code>someMethodName</code> method on the bean called <code>myBean</code> in the <a shape="rect" href="registry.html">Registry</a> such as JNDI or <a shape="rect" href="spring.html">Spring</a>.</p><p>And the route in Spring DSL:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -9963,7 +10016,7 @@ template.requestBodyAndHeader(&quot;dire
   &lt;/route&gt;
 ]]></script>
 </div></div><p></p><h3 id="BookComponentAppendix-SeeAlso.65">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="quartz.html">Quartz</a></li></ul> <h2 id="BookComponentAppendix-ValidationComponent">Validation Component</h2><p>The Validation component performs XML validation of the message body using the JAXP Validation API and based on any of the supported XML schema languages, which defaults to <a shape="rect" class="external-link" href="http://www.w3.org/XML/Schema" rel="nofollow">XML Schema</a></p><p>Note that the <a shape="rect" href="jing.html">Jing</a> component also supports the following useful schema languages:</p><ul><li><a shape="rect" class="external-link" href="http://relaxng.org/compact-tutorial-20030326.html" rel="nofollow">RelaxNG Compact Syntax</a></li><li><a shape="rect" class
 ="external-link" href="http://relaxng.org/" rel="nofollow">RelaxNG XML Syntax</a></li></ul><p>The <a shape="rect" href="msv.html">MSV</a> component also supports <a shape="rect" class="external-link" href="http://relaxng.org/" rel="nofollow">RelaxNG XML Syntax</a>.</p><h3 id="BookComponentAppendix-URIformat.71">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<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="quartz.html">Quartz</a></li></ul> <h2 id="BookComponentAppendix-ValidationComponent">Validation Component</h2><p>The Validation component performs XML validation of the message body using the JAXP Validation API and based on any of the supported XML schema languages, which defaults to <a shape="rect" class="external-link" href="http://www.w3.org/XML/Schema" rel="nofollow">XML Schema</a></p><p>Note that the <a shape="rect" href="jing.html">Jing</a> component also supports the following useful schema languages:</p><ul><li><a shape="rect" class="external-link" href="http://relaxng.org/compact-tutorial-20030326.html" rel="nofollow">RelaxNG Compact Syntax</a></li><li><a shape="rect" class
 ="external-link" href="http://relaxng.org/" rel="nofollow">RelaxNG XML Syntax</a></li></ul><p>The <a shape="rect" href="msv.html">MSV</a> component also supports <a shape="rect" class="external-link" href="http://relaxng.org/" rel="nofollow">RelaxNG XML Syntax</a>.</p><h3 id="BookComponentAppendix-URIformat.72">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[validator:someLocalOrRemoteResource
 ]]></script>
 </div></div><p>Where <strong>someLocalOrRemoteResource</strong> is some URL to a local resource on the classpath or a full URL to a remote resource or resource on the file system which contains the XSD to validate against. For example:</p><ul><li><code>msv:org/foo/bar.xsd</code></li><li><code>msv:file:../foo/bar.xsd</code></li><li><code>msv:<a shape="rect" class="external-link" href="http://acme.com/cheese.xsd" rel="nofollow">http://acme.com/cheese.xsd</a></code></li><li><code>validator:com/mypackage/myschema.xsd</code></li></ul><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component when using <strong>Camel 2.8</strong> or older:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -9974,7 +10027,7 @@ template.requestBodyAndHeader(&quot;dire
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div><p>From Camel 2.9 onwards the <a shape="rect" href="validation.html">Validation</a> component is provided directly in the camel-core.</p><h3 id="BookComponentAppendix-Options.56">Options</h3><div class="confluenceTableSmall"><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>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">resourceResolverFactory</td><td colspan="1" rowspan="1" class="confluenceTd">DefaultValidatorResourceResolverFactory</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.17</strong>: Reference to a <code>org.apache.camel.component.validator.ValidatorResourceResolverFactory </code>which creates a resource resolver per endpoint<code>. </code><span>The default implementation creates an instance of <code><span>org
 .apache.camel.component.validator.</span>DefaultLSResourceResolver per endpoint </code></span><span><span>which creates the default resource resolver <code><span>org.apache.camel.component.validator.</span>DefaultLSResourceResolver. The default resource resolver</code> reads the schema files from the classpath and the file system. This option instead of the option <code>resourceResolver</code> shall be used when the resource resolver depends on the resource URI of the root schema document specified in the endpoint; for example, if you want to extend the default resource resolver. This option is also available on the validator component, so that you can set the resource resolver factory only once for all endpoints.</span></span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceResolver</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.9:</strong
 > Reference to a <code>org.w3c.dom.ls.LSResourceResolver</code> in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>useDom</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 <code>DOMSource</code>/<code>DOMResult</code> or <code>SaxSource</code>/<code>SaxResult</code> should be used by the validator.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>useSharedSchema</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.3:</strong> Whether the <code>Schema</code> instance should be shared or not. This option is introduced to work around a <a shape="rect" class="external-link" href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6773084" rel="nofollow">JDK 1.6.x bug</a>. 
 Xerces should not have this issue.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>failOnNullBody</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.9.5/2.10.3:</strong> Whether to fail if no body exists.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headerName</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.11:</strong> To validate against a header instead of the message body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>failOnNullHeader</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.11:</strong> Whether to fail if no header exists when validating against a header.</
 p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-Example.11">Example</h3><p>The following <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml">example</a> shows how to configure a route from endpoint <strong>direct:start</strong> which then goes to one of two endpoints, either <strong>mock:valid</strong> or <strong>mock:invalid</strong> based on whether or not the XML matches the given schema (which is supplied on the classpath).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>From Camel 2.9 onwards the <a shape="rect" href="validation.html">Validation</a> component is provided directly in the camel-core.</p><h3 id="BookComponentAppendix-Options.57">Options</h3><div class="confluenceTableSmall"><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>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">resourceResolverFactory</td><td colspan="1" rowspan="1" class="confluenceTd">DefaultValidatorResourceResolverFactory</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.17</strong>: Reference to a <code>org.apache.camel.component.validator.ValidatorResourceResolverFactory </code>which creates a resource resolver per endpoint<code>. </code><span>The default implementation creates an instance of <code><span>org
 .apache.camel.component.validator.</span>DefaultLSResourceResolver per endpoint </code></span><span><span>which creates the default resource resolver <code><span>org.apache.camel.component.validator.</span>DefaultLSResourceResolver. The default resource resolver</code> reads the schema files from the classpath and the file system. This option instead of the option <code>resourceResolver</code> shall be used when the resource resolver depends on the resource URI of the root schema document specified in the endpoint; for example, if you want to extend the default resource resolver. This option is also available on the validator component, so that you can set the resource resolver factory only once for all endpoints.</span></span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>resourceResolver</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.9:</strong
 > Reference to a <code>org.w3c.dom.ls.LSResourceResolver</code> in the <a shape="rect" href="registry.html">Registry</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>useDom</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 <code>DOMSource</code>/<code>DOMResult</code> or <code>SaxSource</code>/<code>SaxResult</code> should be used by the validator.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>useSharedSchema</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.3:</strong> Whether the <code>Schema</code> instance should be shared or not. This option is introduced to work around a <a shape="rect" class="external-link" href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6773084" rel="nofollow">JDK 1.6.x bug</a>. 
 Xerces should not have this issue.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>failOnNullBody</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.9.5/2.10.3:</strong> Whether to fail if no body exists.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headerName</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.11:</strong> To validate against a header instead of the message body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>failOnNullHeader</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.11:</strong> Whether to fail if no header exists when validating against a header.</
 p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-Example.11">Example</h3><p>The following <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/validator/camelContext.xml">example</a> shows how to configure a route from endpoint <strong>direct:start</strong> which then goes to one of two endpoints, either <strong>mock:valid</strong> or <strong>mock:invalid</strong> based on whether or not the XML matches the given schema (which is supplied on the classpath).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 &lt;route&gt;
     &lt;from uri=&quot;direct:start&quot;/&gt;
@@ -10000,10 +10053,10 @@ template.requestBodyAndHeader(&quot;dire
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div><h3 id="BookComponentAppendix-URIformat.72">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookComponentAppendix-URIformat.73">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[velocity:templateName[?options]
 ]]></script>
-</div></div><p>Where <strong>templateName</strong> is the classpath-local URI of the template to invoke; or the complete URL of the remote template (eg: <a shape="rect" class="external-link" href="file://folder/myfile.vm" rel="nofollow">file://folder/myfile.vm</a>).</p><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-Options.57">Options</h3><div class="confluenceTableSmall"><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>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>loaderCache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Velocity based file
  loader cache.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>contentCache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Cache for the resource content when it is loaded. <br clear="none" class="atl-forced-newline"> Note : as of Camel 2.9 cached resource content can be cleared via JMX using the endpoint's <code>clearContentCache</code> operation.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Character encoding of the resource content.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertiesFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New option in
  Camel 2.1: The URI of the properties file which is used for VelocityEngine initialization.</p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-MessageHeaders.19">Message Headers</h3><p>The velocity component sets a couple headers on the message (you can't set these yourself and from Camel 2.1 velocity component will not set these headers which will cause some side effect on the dynamic template support):</p><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>CamelVelocityResourceUri</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The <strong>templateName</strong> as a <code>String</code> object.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelVelocitySupplementalC
 ontext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong> To add additional information to the used VelocityContext. The value of this header should be a <code>Map</code> with key/values that will added (override any existing key with the same name).<br clear="none">This can be used to pre setup some common key/values you want to reuse in your velocity endpoints.</p></td></tr></tbody></table></div></div><p>Headers set during the Velocity evaluation are returned to the message and added as headers. Then its kinda possible to return values from Velocity to the Message.</p><p>For example, to set the header value of <code>fruit</code> in the Velocity template <code>.tm</code>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Where <strong>templateName</strong> is the classpath-local URI of the template to invoke; or the complete URL of the remote template (eg: <a shape="rect" class="external-link" href="file://folder/myfile.vm" rel="nofollow">file://folder/myfile.vm</a>).</p><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-Options.58">Options</h3><div class="confluenceTableSmall"><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>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>loaderCache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Velocity based file
  loader cache.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>contentCache</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Cache for the resource content when it is loaded. <br clear="none" class="atl-forced-newline"> Note : as of Camel 2.9 cached resource content can be cleared via JMX using the endpoint's <code>clearContentCache</code> operation.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Character encoding of the resource content.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>propertiesFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>New option in
  Camel 2.1: The URI of the properties file which is used for VelocityEngine initialization.</p></td></tr></tbody></table></div></div><h3 id="BookComponentAppendix-MessageHeaders.20">Message Headers</h3><p>The velocity component sets a couple headers on the message (you can't set these yourself and from Camel 2.1 velocity component will not set these headers which will cause some side effect on the dynamic template support):</p><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>CamelVelocityResourceUri</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The <strong>templateName</strong> as a <code>String</code> object.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelVelocitySupplementalC
 ontext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong> To add additional information to the used VelocityContext. The value of this header should be a <code>Map</code> with key/values that will added (override any existing key with the same name).<br clear="none">This can be used to pre setup some common key/values you want to reuse in your velocity endpoints.</p></td></tr></tbody></table></div></div><p>Headers set during the Velocity evaluation are returned to the message and added as headers. Then its kinda possible to return values from Velocity to the Message.</p><p>For example, to set the header value of <code>fruit</code> in the Velocity template <code>.tm</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[$in.setHeader(&quot;fruit&quot;, &quot;Apple&quot;)
 ]]></script>

[... 60 lines stripped ...]