Modified: websites/production/camel/content/telegram.html
==============================================================================
--- websites/production/camel/content/telegram.html (original)
+++ websites/production/camel/content/telegram.html Thu Nov 10 23:20:31 2016
@@ -85,20 +85,22 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 
id="Telegram-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 shape="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-m
 acro 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><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h2 
id="Telegram-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 shape="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&#160;<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&#160;<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&#160;<strong><code>pom.xml</code></strong> for this component:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &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="Telegram-URIformat">URI format</h3><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="Telegram-URIFormat">URI Format</h3><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" 
type="syntaxhighlighter"><![CDATA[telegram:type/authorizationToken[?options]]]></script>
-</div></div><h3 id="Telegram-Options">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></div><h3 id="Telegram-Options">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">&#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" rowsp
 an="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">&#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 consume
 r 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 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">&#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" c
 lass="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="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" c
 lass="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 col
 span="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 mo
 re 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 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-spr
 ing 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 cl
 ass="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">&#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) 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"><c
 ode>common</code></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&#160;<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&#160;<strong><code>org.apache.ca
 mel.spi.ExceptionHandler</code></strong> to deal with exceptions that will be 
logged at&#160;<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="t
 ableblock">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&#160;<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>&#160;</p><p 
class="tableblock">(advanced)</p></td><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 <strong><code>ExceptionHandler</code></strong>. </p><p 
class="tableblock"><strong>Note</strong>: if the 
option&#160;<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>&#160;</p><p 
class="tableblock">(advanced)</p></td><td colspan="1" rowspan="1" 
class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd"><p class="tableblock">A 
pluggable&#160;<strong><code>org.apache.camel.PollingConsumerPollingStrategy</code></strong>
 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"><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">&#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 e.g., when a telegram user starts a conversation with a 
bot its client sends automatically a&#160;<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>exchangePattern
 </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">&#160;</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&#160;<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">&#160;</td><td colspan="1" rowspan="1" 
class="confluenceTd"><p class="tableblock">The number of subsequent idle polls 
that should happen before 
the&#160;<strong><code>backoffMultiplier</code></strong> should 
kick-in.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p 
class="tableblock"><code>backoffMultip
 lier</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">&#160;</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&#160;<strong><code>backoffIdleThreshold</code></strong> 
and/or&#160;<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&#160;<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>sch
 eduler</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">&#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"><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&#160;<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</co
 de></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"><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</co
 de></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p 
class="tableblock">Time unit 
for&#160;<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&#160;<strong><code>ScheduledExecutorService</code></strong>
 in JDK for details.</p></td></tr></tbody></table>
    </div>
   </div>
  </div>
@@ -108,20 +110,21 @@
    <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 compose
 d 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 wh
 en 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>
   </div>
  </div>
-</div></div><h3 id="Telegram-Usage">Usage</h3><div><div class="sect2"><div 
class="sect3"><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="Telegram-ProducerExample">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">
+</div></div><h3 id="Telegram-Usage">Usage</h3><div><div class="sect2"><div 
class="sect3"><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="Telegram-ProducerExample">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></div><div><div class="sect2"><div class="sect3"><div 
class="paragraph"><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&#160;<strong><code>org.apache.camel.component.telegram.model</code></strong>)</p><div
 class="confluenceTableSmall"><div class="sect2">
  <div class="sect3">
   <div class="sect2">
    <div class="sect3">
@@ -129,7 +132,7 @@
      <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>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>
+        <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>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 <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>
@@ -137,16 +140,17 @@
    </div>
   </div>
  </div>
-</div></div><h4 id="Telegram-ConsumerExample">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 class="codeContent panelContent pdl">
+</div></div><h4 id="Telegram-ConsumerExample">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 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(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">
+  .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;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">
+</div></div><p>The&#160;<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"><![CDATA[public class MyBean {
     public void process(String message) {
         // or Exchange, or 
org.apache.camel.component.telegram.model.IncomingMessage (or both)
@@ -175,16 +179,17 @@
  </div>
 </div></div><h4 id="Telegram-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>
+  .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;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">
+</div></div><p>The&#160;<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"><![CDATA[public class ChatBotLogic {
     public String chatBotProcess(String message) {
         if( &quot;do-not-reply&quot;.equals(message) ) {
@@ -193,7 +198,7 @@
         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></div>
+</div></div><p>Every non-null string returned by 
the&#160;<strong><code>chatBotProcess()</code></strong> method is automatically 
routed to the chat that originated the request (as 
the&#160;<strong><code>CamelTelegramChatId</code></strong> header is used to 
route the message).</p></div></div></div></div></div></div></div></div></div>
         </td>
         <td valign="top">
           <div class="navigation">



Reply via email to