Author: buildbot
Date: Thu Nov 10 23:20:31 2016
New Revision: 1000922
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/telegram.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 Thu Nov 10
23:20:31 2016
@@ -621,8 +621,8 @@ cometds://localhost:8443/service/mychann
<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">/**/
div.rbtoc1478805545259 {padding: 0px;} div.rbtoc1478805545259 ul {list-style:
disc;margin-left: 0px;} div.rbtoc1478805545259 li {margin-left:
0px;padding-left: 0px;} /**/</style>
- </p><div class="toc-macro rbtoc1478805545259">
+</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">/**/
div.rbtoc1478819867857 {padding: 0px;} div.rbtoc1478819867857 ul {list-style:
disc;margin-left: 0px;} div.rbtoc1478819867857 li {margin-left:
0px;padding-left: 0px;} /**/</style>
+ </p><div class="toc-macro rbtoc1478819867857">
<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>
@@ -5799,26 +5799,28 @@ test.endpoint = result2</pre>
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"> </script>
</div>
</div><p><bean id="repo"
class="org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository">
<property name="transactionManager" ref="transactionManager"/>
<property name="repositoryName" value="aggregation"/> <property
name="dataSource" ref="dataSource"/> <property
name"jdbcOptimisticLockingExceptionMapper" ref="myExceptionMapper"/>
</bean> <!-- use the default mapper with extra FQN class names from
our JDBC driver --> <bean id="myExceptionMapper"
class="org.apache.camel.processor.aggregate.jdbc.DefaultJdbcOptimisticLockingExceptionMapper">
<property name="classNames"> <util:set>
<value>com.foo.sql.MyViolationExceptoion</value>
<value>com.foo.sql.MyOtherViolationExceptoion</value>
</util:set> </property> </bean></p><p> </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-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">
+ <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 <strong><code>camel-telegram</code></strong> 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>
+ <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 <strong><code>/</code></strong> character), ask the BotFather to
</span><strong>disable the privacy mode</strong>, using the
<strong><code>/setprivacy</code></strong> command.</p>
</div>
-</div><p>Maven users will need to add the following dependency to their
pom.xml for this component:</p><div class="code panel pdl" style="border-width:
1px;">
+</div><p>Maven users will need to add the following dependency to
their <strong><code>pom.xml</code></strong> for this component:</p><div
class="code panel pdl" style="border-width: 1px;">
<div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter">&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.67">URI format</h3><div
class="code panel pdl" style="border-width: 1px;">
+</div><h3 id="BookComponentAppendix-URIFormat.5">URI Format</h3><div
class="code panel pdl" style="border-width: 1px;">
<div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter">telegram:type/authorizationToken[?options]</script>
</div>
-</div><h3 id="BookComponentAppendix-Options.54">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><h3 id="BookComponentAppendix-Options.54">Options</h3><p>The Telegram
component has no options. However, the Telegram component does support 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"> </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"> </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" rows
pan="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></td><td colspan="1" rowspan="1"
class="confluenceTd"> </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 consum
er 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"> </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 colspan="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"> </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"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock">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"> </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"> </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 co
lspan="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 m
ore 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"
rowspan="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 i
t 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"> </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-sp
ring 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"> </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 c
lass="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="confluenceTd"><p class="tableblock">Controls if fixed delay or fixed
rate is used. See ScheduledExecutorService in JDK for
details.</p></td></tr></tbody></table>
+ <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"><code>authorizationToken</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p
class="tableblock"><code>common</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock"><strong>Required</strong> The
authorization token for using the bot (ask the BotFather) e.g.,
<strong><code>654321531:HGF_dTra456323dHuOedsE343211fqr3t-H</code></strong>.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>type</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock"><
code>common</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock"><strong>Required</strong> The
endpoint type. Currently only the <strong><code>bots</code></strong> type
is supported.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p
class="tableblock"><code>bridgeErrorHandler</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p
class="tableblock"><code>consumer</code></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 <strong><code>org.apache.c
amel.spi.ExceptionHandler</code></strong> to deal with exceptions that will be
logged at <strong><code>WARN</code>/<code>ERROR</code></strong> level and
ignored.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>limit</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock"><code>consumer</code></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"><code>sendEmptyMessageWhenIdle</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>consumer</code></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"><code>timeout</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>consumer</code></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 <strong><code>0</code></strong> 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"><code>exceptionHandler</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p
class="tableblock"><code>consumer</code> </p><p
class="tableblock">(advanced)</p></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><t
d colspan="1" rowspan="1" class="confluenceTd"><p class="tableblock">To let
the consumer use a custom <strong><code>ExceptionHandler</code></strong>.
</p><p class="tableblock"><strong>Note</strong>: if the
option <strong><code>bridgeErrorHandler</code></strong> is enabled then
this options is not in use. By default the consumer will deal with exceptions
that will be logged at <strong><code>WARN</code>/<code>ERROR</code></strong>
level and ignored.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p
class="tableblock"><code>pollStrategy</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p
class="tableblock"><code>consumer</code> </p><p
class="tableblock">(advanced)</p></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock">A
pluggable <strong><code>org.apache.camel.PollingConsumerPollingStrategy</code></strong>
allowing you to provide your custom implementatio
n 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
colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>chatId</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock"><code>producer</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"> </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 e.g., when a telegram user starts a conversation with a
bot its client sends automatically a <strong><code>/start</code></strong>
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"><code>exchangePatter
n</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>advanced</code></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"><code>synchronous</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock"><code>advanced</code></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"><code>backoffErrorThreshold</code></p></td>
<td colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock">The number of subsequent error polls
(failed due some error) that should happen before
the <strong><code>backoffMultiplier</code></strong> should
kick-in.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>backoffIdleThreshold</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock">The number of subsequent idle polls
that should happen before
the <strong><code>backoffMultiplier</code></strong> should
kick-in.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>backoffMulti
plier</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"> </td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock">To let the scheduled polling
consumer back-off 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 <strong><code>backoffIdleThreshold</code></strong>
and/or <strong><code>backoffErrorThreshold</code></strong> must also be
configured.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock"><code>delay</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></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:</p>
+ <ul><li class="tableblock"><strong><code>60s</code></strong> (60
seconds)</li><li class="tableblock"><strong><code>5m30s</code></strong> (5
minutes and 30 seconds)</li><li
class="tableblock"><strong><code>1h</code></strong> (1
hour)</li></ul></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock"><code>greedy</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></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 <strong><code>ScheduledPollConsumer</code></strong> 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"><code>initialDelay</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p class="tableblock"><code>sc
heduler</code></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:</p>
+ <ul><li class="tableblock"><strong><code>60s</code></strong> (60
seconds)</li><li class="tableblock"><strong><code>5m30s</code></strong> (5
minutes and 30 seconds)</li><li
class="tableblock"><strong><code>1h</code></strong> (1
hour)</li></ul></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p
class="tableblock"><code>runLoggingLevel</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></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"><code>scheduledExecutorService</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></p
></td><td colspan="1" rowspan="1" class="confluenceTd"> </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"><code>scheduler</code></p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p class="tableblock"><code>scheduler</code></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 <strong><code>camel-quartz2</code></strong>
>component</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p
>class="tableblock"><code>schedulerProperties</code></p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p class="tableblock"><code>scheduler</c
ode></p></td><td colspan="1" rowspan="1" class="confluenceTd"> </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"><code>startScheduler</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></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"><code>timeUnit</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p class="tableblock"><code>ms</c
ode></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock">Time unit
for <strong><code>initialDelay</code></strong> and delay
options.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p
class="tableblock"><code>useFixedDelay</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p
class="tableblock"><code>scheduler</code></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">Controls if
fixed delay or fixed rate is used.</p><p
class="tableblock">See <strong><code>ScheduledExecutorService</code></strong>
in JDK for details.</p></td></tr></tbody></table>
</div>
</div>
</div>
@@ -5830,7 +5832,7 @@ test.endpoint = result2</pre>
<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 endpoint
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 compos
ed 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>
+ <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 <strong><code>CamelTelegramChatId</code></strong> header or in the
endpoint configuration (<strong><code>chatId</code></strong> 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 w
hen the outgoing message is composed of pure binary data. Possible values are
strings or enum values belonging to the
<strong><code>org.apache.camel.component.telegram.TelegramMediaType</code></strong>
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>
@@ -5848,13 +5850,13 @@ test.endpoint = result2</pre>
<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>
+ <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">from(&quot;direct:start&quot;).to(&quot;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;);</script>
+ <script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter">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>
+ <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">&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>
@@ -5864,8 +5866,8 @@ test.endpoint = result2</pre>
<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 <em>org.apache.camel.component.telegram.model</em>)</p>
+ <p>The code <strong><code style="line-height:
1.42857;">123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L</code></strong>
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
<strong><code>Outgoing<em>XXX</em>Message</code></strong> belong to the
package <strong><code>org.apache.camel.component.telegram.model</code></strong>)</p>
<div class="confluenceTableSmall">
<div class="sect2">
<div class="sect3">
@@ -5875,7 +5877,7 @@ test.endpoint = result2</pre>
<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>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>OutgoingVideoMessa
ge</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>
+ <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>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>OutgoingVideoMe
ssage</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 <strong><code>CamelTelegramMediaType</code></strong> 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
<strong><code>OutgoingTextMessage</code></strong></p></td></tr></tbody></table>
</div>
</div>
</div>
@@ -5891,19 +5893,19 @@ test.endpoint = result2</pre>
</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>
+ <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">from(&quot;telegram:bots/123456789:AAE_dLq5C19xwGjw3yiC2NvEUrZcejK21-Q987654321:AAE_dLq5C19xwOmg5yiC2NvSrkT3wj5Q1-L&quot;)
.bean(ProcessorBean.class)</script>
</div>
</div>
- <p>or in Spring XML</p>
+ <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">&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>
+ <script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter">&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>
+ <p>The <strong><code>MyBean</code></strong> 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">public class MyBean { public void process(String
message) { // or Exchange, or
org.apache.camel.component.telegram.model.IncomingMessage (or both) // do
process } }</script>
@@ -5944,16 +5946,16 @@ test.endpoint = result2</pre>
<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">&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>
+ <script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter">&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>
+ <p>The <strong><code>ChatBotLogic</code></strong> 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">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>
+ <p>Every non-null string returned by
the <strong><code>chatBotProcess()</code></strong> method is automatically
routed to the chat that originated the request (as
the <strong><code>CamelTelegramChatId</code></strong> header is used to
route the message).</p>
</div>
</div>
</div>
@@ -5965,7 +5967,7 @@ test.endpoint = result2</pre>
<div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter">&lt;dependency&gt;
&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
&lt;artifactId&gt;camel-spring&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><p>From <strong>Camel 2.9</strong>: the <a shape="rect"
href="test.html">Test</a> component is provided directly in
<strong><code>camel-core</code></strong>.</p><h3
id="BookComponentAppendix-URIformat.68">URI format</h3><div class="code panel
pdl" style="border-width: 1px;">
+</div><p>From <strong>Camel 2.9</strong>: the <a shape="rect"
href="test.html">Test</a> component is provided directly in
<strong><code>camel-core</code></strong>.</p><h3
id="BookComponentAppendix-URIformat.67">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">test:expectedMessagesEndpointUri </script>
</div>
@@ -5978,7 +5980,7 @@ test.endpoint = result2</pre>
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter">from(&quot;seda:someEndpoint&quot;)
.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.69">URI format</h3><div class="code panel
pdl" style="border-width: 1px;">
+ <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.68">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">timer:name[?options] </script>
</div>
@@ -6028,7 +6030,7 @@ test.endpoint = result2</pre>
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"> &lt;route&gt; &lt;from
uri=&quot;timer://foo?repeatCount=1&quot;/&gt; &lt;to
uri=&quot;bean:myBean?method=someMethodName&quot;/&gt;
&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.70">URI format</h3><div class="code panel
pdl" style="border-width: 1px;">
+ <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.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">validator:someLocalOrRemoteResource </script>
</div>
@@ -6050,7 +6052,7 @@ test.endpoint = result2</pre>
<div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter">&lt;dependency&gt;
&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
&lt;artifactId&gt;camel-velocity&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.71">URI format</h3><div
class="code panel pdl" style="border-width: 1px;">
+</div><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">velocity:templateName[?options] </script>
</div>
@@ -6112,7 +6114,7 @@ test.endpoint = result2</pre>
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"> private Exchange createLetter() { Exchange exchange =
context.getEndpoint(&quot;direct:a&quot;).createExchange(); Message msg
= exchange.getIn(); msg.setHeader(&quot;firstName&quot;,
&quot;Claus&quot;); msg.setHeader(&quot;lastName&quot;,
&quot;Ibsen&quot;); msg.setHeader(&quot;item&quot;,
&quot;Camel in Action&quot;); msg.setBody(&quot;PS: Next beer is on
me, James&quot;); return exchange; } @Test public void testVelocityLetter()
throws Exception { MockEndpoint mock =
getMockEndpoint(&quot;mock:result&quot;); mock.expectedMessageCount(1);
mock.message(0).body(String.class).contains(&quot;Thanks for the order of
Camel in Action&quot;); template.send(&quot;direct:a&quot;,
createLetter()); mock.assertIsSatisfied(); } protected RouteBuilder
createRouteBuilder() throws Exception { return new RouteBuilder() { publi
c void configure() throws Exception {
from(&quot;direct:a&quot;).to(&quot;velocity:org/apache/camel/component/velocity/letter.vm&quot;).to(&quot;mock:result&quot;);
} }; } </script>
</div>
</div><h3 id="BookComponentAppendix-SeeAlso.67">See Also</h3>
- <ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul><h2
id="BookComponentAppendix-VMComponent">VM Component</h2><p>The
<strong>vm:</strong> component provides asynchronous <a shape="rect"
class="external-link" href="http://www.eecs.harvard.edu/~mdw/proj/seda/"
rel="nofollow">SEDA</a> behavior, exchanging messages on a <a shape="rect"
class="external-link"
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/BlockingQueue.html"
rel="nofollow">BlockingQueue</a> and invoking consumers in a separate thread
pool.</p><p>This component differs from the <a shape="rect"
href="seda.html">Seda</a> component in that VM supports communication across
CamelContext instances - so you can use this mechanism to communicate across
web applications (provided that <code
>camel-core.jar</code> is on the <code>system/boot</code> classpath).</p><p>VM
>is an extension to the <a shape="rect" href="seda.html">Seda</a>
>component.</p><h3 id="BookComponentAppendix-URIformat.72">URI format</h3><div
>class="code panel pdl" style="border-width: 1px;">
+ <ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul><h2
id="BookComponentAppendix-VMComponent">VM Component</h2><p>The
<strong>vm:</strong> component provides asynchronous <a shape="rect"
class="external-link" href="http://www.eecs.harvard.edu/~mdw/proj/seda/"
rel="nofollow">SEDA</a> behavior, exchanging messages on a <a shape="rect"
class="external-link"
href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/BlockingQueue.html"
rel="nofollow">BlockingQueue</a> and invoking consumers in a separate thread
pool.</p><p>This component differs from the <a shape="rect"
href="seda.html">Seda</a> component in that VM supports communication across
CamelContext instances - so you can use this mechanism to communicate across
web applications (provided that <code
>camel-core.jar</code> is on the <code>system/boot</code> classpath).</p><p>VM
>is an extension to the <a shape="rect" href="seda.html">Seda</a>
>component.</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"> vm:queueName[?options] </script>
</div>
@@ -6146,7 +6148,7 @@ test.endpoint = result2</pre>
<div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter">&lt;dependency&gt;
&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
&lt;artifactId&gt;camel-xmpp&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.73">URI format</h3><div
class="code panel pdl" style="border-width: 1px;">
+</div><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: text; gutter: false; theme: Default"
type="syntaxhighlighter">xmpp://[login@]hostname[:port][/participant][?Options]
</script>
</div>
@@ -6185,7 +6187,7 @@ test.endpoint = result2</pre>
<div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"> &lt;dependency&gt;
&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
&lt;artifactId&gt;camel-saxon&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.74">URI format</h3><div
class="code panel pdl" style="border-width: 1px;">
+</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"> xquery:templateName[?options] </script>
</div>
@@ -6197,7 +6199,7 @@ test.endpoint = result2</pre>
<div class="codeContent panelContent pdl">
<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"> from(&quot;activemq:My.Queue&quot;).
to(&quot;xquery:com/acme/mytransform.xquery&quot;).
to(&quot;activemq:Another.Queue&quot;); </script>
</div>
-</div><h3 id="BookComponentAppendix-SeeAlso.70">See Also</h3><ul><li><a
shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a
shape="rect" href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul><h2
id="BookComponentAppendix-XSLT">XSLT</h2><p>The <strong>xslt:</strong>
component allows you to process a message using an <a shape="rect"
class="external-link" href="http://www.w3.org/TR/xslt" rel="nofollow">XSLT</a>
template. This can be ideal when using <a shape="rect"
href="templating.html">Templating</a> to generate respopnses for
requests.</p><h3 id="BookComponentAppendix-URIformat.75">URI format</h3><div
class="code panel pdl" style="border-width: 1px;">
+</div><h3 id="BookComponentAppendix-SeeAlso.70">See Also</h3><ul><li><a
shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a
shape="rect" href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul><h2
id="BookComponentAppendix-XSLT">XSLT</h2><p>The <strong>xslt:</strong>
component allows you to process a message using an <a shape="rect"
class="external-link" href="http://www.w3.org/TR/xslt" rel="nofollow">XSLT</a>
template. This can be ideal when using <a shape="rect"
href="templating.html">Templating</a> to generate respopnses for
requests.</p><h3 id="BookComponentAppendix-URIformat.74">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">xslt:templateName[?options] </script>
</div>