You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2015/03/05 08:18:05 UTC

svn commit: r942395 - in /websites/production/camel/content: cache/main.pageCache scheduler.html

Author: buildbot
Date: Thu Mar  5 07:18:05 2015
New Revision: 942395

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/scheduler.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/scheduler.html
==============================================================================
--- websites/production/camel/content/scheduler.html (original)
+++ websites/production/camel/content/scheduler.html Thu Mar  5 07:18:05 2015
@@ -88,7 +88,7 @@
 <div class="wiki-content maincontent"><h2 id="Scheduler-SchedulerComponent">Scheduler Component</h2><p><strong>Available as of Camel 2.15</strong></p><p>The <strong>scheduler:</strong> component is used to generate message exchanges when a scheduler fires. This component is similar to the &#160;<a shape="rect" href="timer.html">Timer</a>&#160;component, but it offers more functionality in terms of scheduling. Also this component uses JDK&#160;<code>ScheduledExecutorService</code>. Where as the timer uses a JDK&#160;<code>Timer</code>.</p><p>You can only consume events from this endpoint.</p><h3 id="Scheduler-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[scheduler:name[?options]
 ]]></script>
-</div></div><p>Where <code>name</code> is the name of the scheduler, which is created and shared across endpoints. So if you use the same name for all your timer endpoints, only one scheduler thread pool&#160;and thread will be used - but you can configure the thread pool to allow more concurrent threads.</p><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><p><strong>Note:</strong> The IN body of the generated exchange is <code>null</code>. So <code>exchange.getIn().getBody()</code> returns <code>null</code>.</p><h3 id="Scheduler-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceT
 d">initialDelay</td><td colspan="1" rowspan="1" class="confluenceTd">1000</td><td colspan="1" rowspan="1" class="confluenceTd">Milliseconds before the first poll starts</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>period</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If greater than 0, generate periodic events every <code>period</code> milliseconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>delay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>500</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Milliseconds before the next poll</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="font-family: monospace;">timeUnit</span></p></td><td colspan="1" rowspan="1" class="confluenceTd">MILLISECONDS</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="col
 or: rgb(0,0,0);">time unit for&#160;</span><code>initialDelay</code><span style="color: rgb(0,0,0);">&#160;and&#160;</span><code>delay</code><span style="color: rgb(0,0,0);">&#160;options.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">useFixedDelay</td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">Controls if fixed delay or fixed rate is used. See&#160;</span><a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html" rel="nofollow">ScheduledExecutorService</a><span style="color: rgb(0,0,0);">&#160;in JDK for details.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">pollStrategy</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">A pluggable&#160;</span><code>org.apache.camel.Polli
 ngConsumerPollingStrategy</code><span style="color: rgb(0,0,0);">&#160;allowing you to provide your custom implementation to control error handling usually occurred during the&#160;</span><code>poll</code><span style="color: rgb(0,0,0);">&#160;operation&#160;</span><strong>before</strong><span style="color: rgb(0,0,0);">&#160;an&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/exchange.html">Exchange</a><span style="color: rgb(0,0,0);">&#160;have been created and being routed in Camel. In other words the error occurred while the polling was gathering information, for instance access to a file network failed so Camel cannot access it to scan for files. The default implementation will log the caused exception at&#160;</span><code>WARN</code><span style="color: rgb(0,0,0);">&#160;level and ignore it.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">runLoggingLevel</td><td colspan="1" rowspan="1" class="confluenceTd">TRACE</td><td colsp
 an="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">sendEmptyMessageWhenIdle</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">greedy</td><td colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">scheduler</td><td colspan
 ="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">Allow to plugin a custom&#160;</span><code>org.apache.camel.spi.ScheduledPollConsumerScheduler</code><span style="color: rgb(0,0,0);">&#160;to use as the scheduler for firing when the polling consumer runs. The default implementation uses the</span><code>ScheduledExecutorService</code><span style="color: rgb(0,0,0);">&#160;and there is a&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/quartz2.html">Quartz2</a><span style="color: rgb(0,0,0);">, and&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/spring.html">Spring</a><span style="color: rgb(0,0,0);">&#160;based which supports CRON expressions.&#160;</span><strong>Notice:</strong><span style="color: rgb(0,0,0);">&#160;If using a custom scheduler then the options for&#160;</span><code>initialDelay</code><span style="color: rgb(0,0,0);">,&#160;
 </span><code>useFixedDelay</code><span style="color: rgb(0,0,0);">,&#160;</span><code>timeUnit</code><span style="color: rgb(0,0,0);">, and</span><code>scheduledExecutorService</code><span style="color: rgb(0,0,0);">&#160;may not be in use. Use the text&#160;</span><code>quartz2</code><span style="color: rgb(0,0,0);">&#160;to refer to use the&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/quartz2.html">Quartz2</a><span style="color: rgb(0,0,0);">&#160;scheduler; and use the text&#160;</span><code>spring</code><span style="color: rgb(0,0,0);">&#160;to use the&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/spring.html">Spring</a><span style="color: rgb(0,0,0);">&#160;based; and use the text&#160;</span><code>#myScheduler</code><span style="color: rgb(0,0,0);">&#160;to refer to a custom scheduler by its id in the&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/registry.html">Registry</a><s
 pan style="color: rgb(0,0,0);">. See&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/quartz2.html">Quartz2</a><span style="color: rgb(0,0,0);">&#160;page for an example.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">schedulerProperties.xxx</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">To configure additional properties when using a custom&#160;</span><code>scheduler</code><span style="color: rgb(0,0,0);">&#160;or any of the&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/quartz2.html">Quartz2</a><span style="color: rgb(0,0,0);">,&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/spring.html">Spring</a> <span style="color: rgb(0,0,0);">based scheduler.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">backoffMultiplier</td><td colspan="1" rowspan="1" c
 lass="confluenceTd">0</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">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&#160;</span><code>backoffIdleThreshold</code><span style="color: rgb(0,0,0);">&#160;and/or&#160;</span><code>backoffErrorThreshold</code><span style="color: rgb(0,0,0);">&#160;must also be configured.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">backoffIdleThreshold</td><td colspan="1" rowspan="1" class="confluenceTd">0</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">The number of subsequent idle polls that should happen before the&#160;</span><code>backoffMultipler</code><span style="color: rgb(0,0,0);">&#160;should kick-in</span></td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd">backoffErrorThreshold</td><td colspan="1" rowspan="1" class="confluenceTd">0</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">The number of subsequent error polls (failed due some error) that should happen before the </span><code>backoffMultipler</code><span style="color: rgb(0,0,0);">&#160;should kick-in.</span></td></tr></tbody></table></div></div><h3 id="Scheduler-Moreinformation">More information</h3><p>This component is a scheduler <a shape="rect" class="external-link" href="http://camel.apache.org/polling-consumer.html" style="line-height: 1.4285715;">Polling Consumer</a>&#160;where you can find more information about the options above, and examples at the <a shape="rect" class="external-link" href="http://camel.apache.org/polling-consumer.html">Polling Consumer</a>&#160;page.</p><h3 id="Scheduler-ExchangeProperties">Exchange Properties</h3><p>When the timer is fired, it adds the following information as proper
 ties to the <code>Exchange</code>:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_NAME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The value of the <code>name</code> option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_FIRED_TIME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Date</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The time when the consumer fired.</p></td></tr></tbody></table></div></div><p>&#160;</p><h3 id="Scheduler-Sample">Sample</h3><p>To set
  up a route that generates an event every 60 seconds:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Where <code>name</code> is the name of the scheduler, which is created and shared across endpoints. So if you use the same name for all your timer endpoints, only one scheduler thread pool&#160;and thread will be used - but you can configure the thread pool to allow more concurrent threads.</p><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><p><strong>Note:</strong> The IN body of the generated exchange is <code>null</code>. So <code>exchange.getIn().getBody()</code> returns <code>null</code>.</p><h3 id="Scheduler-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceT
 d"><code>initialDelay</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>1000</code></td><td colspan="1" rowspan="1" class="confluenceTd">Milliseconds before the first poll starts</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>period</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If greater than 0, generate periodic events every <code>period</code> milliseconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>delay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>500</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Milliseconds before the next poll</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="font-family: monospace;">timeUnit</span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><code>MILLISECONDS</code></td><td colspan="1" rowspan="1
 " class="confluenceTd"><span style="color: rgb(0,0,0);">time unit for&#160;</span><code>initialDelay</code><span style="color: rgb(0,0,0);">&#160;and&#160;</span><code>delay</code><span style="color: rgb(0,0,0);">&#160;options.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>useFixedDelay</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>true</code></td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">Controls if fixed delay or fixed rate is used. See&#160;</span><a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html" rel="nofollow">ScheduledExecutorService</a><span style="color: rgb(0,0,0);">&#160;in JDK for details.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>pollStrategy</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><span s
 tyle="color: rgb(0,0,0);">A pluggable&#160;</span><code>org.apache.camel.PollingConsumerPollingStrategy</code><span style="color: rgb(0,0,0);">&#160;allowing you to provide your custom implementation to control error handling usually occurred during the&#160;</span><code>poll</code><span style="color: rgb(0,0,0);">&#160;operation&#160;</span><strong>before</strong><span style="color: rgb(0,0,0);">&#160;an&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/exchange.html">Exchange</a><span style="color: rgb(0,0,0);">&#160;have been created and being routed in Camel. In other words the error occurred while the polling was gathering information, for instance access to a file network failed so Camel cannot access it to scan for files. The default implementation will log the caused exception at&#160;</span><code>WARN</code><span style="color: rgb(0,0,0);">&#160;level and ignore it.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>runL
 oggingLevel</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>TRACE</code></td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>sendEmptyMessageWhenIdle</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>greedy</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">If greedy is enabled, then the ScheduledPollConsumer will run imme
 diately again, if the previous run polled 1 or more messages.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>scheduler</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">Allow to plugin a custom&#160;</span><code>org.apache.camel.spi.ScheduledPollConsumerScheduler</code><span style="color: rgb(0,0,0);">&#160;to use as the scheduler for firing when the polling consumer runs. The default implementation uses the</span><code>ScheduledExecutorService</code><span style="color: rgb(0,0,0);">&#160;and there is a&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/quartz2.html">Quartz2</a><span style="color: rgb(0,0,0);">, and&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/spring.html">Spring</a><span style="color: rgb(0,0,0);">&#160;based which supports CRON expressions.&#160;</span><strong>Notice:</str
 ong><span style="color: rgb(0,0,0);">&#160;If using a custom scheduler then the options for&#160;</span><code>initialDelay</code><span style="color: rgb(0,0,0);">,&#160;</span><code>useFixedDelay</code><span style="color: rgb(0,0,0);">,&#160;</span><code>timeUnit</code><span style="color: rgb(0,0,0);">, and</span><code>scheduledExecutorService</code><span style="color: rgb(0,0,0);">&#160;may not be in use. Use the text&#160;</span><code>quartz2</code><span style="color: rgb(0,0,0);">&#160;to refer to use the&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/quartz2.html">Quartz2</a><span style="color: rgb(0,0,0);">&#160;scheduler; and use the text&#160;</span><code>spring</code><span style="color: rgb(0,0,0);">&#160;to use the&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/spring.html">Spring</a><span style="color: rgb(0,0,0);">&#160;based; and use the text&#160;</span><code>#myScheduler</code><span style="color: rgb(0,0
 ,0);">&#160;to refer to a custom scheduler by its id in the&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/registry.html">Registry</a><span style="color: rgb(0,0,0);">. See&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/quartz2.html">Quartz2</a><span style="color: rgb(0,0,0);">&#160;page for an example.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>schedulerProperties.xxx</code></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">To configure additional properties when using a custom&#160;</span><code>scheduler</code><span style="color: rgb(0,0,0);">&#160;or any of the&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/quartz2.html">Quartz2</a><span style="color: rgb(0,0,0);">,&#160;</span><a shape="rect" class="external-link" href="http://camel.apache.org/spring.html"
 >Spring</a> <span style="color: rgb(0,0,0);">based scheduler.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>backoffMultiplier</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>0</code></td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">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&#160;</span><code>backoffIdleThreshold</code><span style="color: rgb(0,0,0);">&#160;and/or&#160;</span><code>backoffErrorThreshold</code><span style="color: rgb(0,0,0);">&#160;must also be configured.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>backoffIdleThreshold</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>0</code></td><td colspan="1" rowspan="1" class="confluenceTd"
 ><span style="color: rgb(0,0,0);">The number of subsequent idle polls that should happen before the&#160;</span><code>backoffMultipler</code><span style="color: rgb(0,0,0);">&#160;should kick-in</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>backoffErrorThreshold</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>0</code></td><td colspan="1" rowspan="1" class="confluenceTd"><span style="color: rgb(0,0,0);">The number of subsequent error polls (failed due some error) that should happen before the </span><code>backoffMultipler</code><span style="color: rgb(0,0,0);">&#160;should kick-in.</span></td></tr></tbody></table></div></div><h3 id="Scheduler-Moreinformation">More information</h3><p>This component is a scheduler <a shape="rect" class="external-link" href="http://camel.apache.org/polling-consumer.html" style="line-height: 1.4285715;">Polling Consumer</a>&#160;where you can find more information about the options above, and examples at the
  <a shape="rect" class="external-link" href="http://camel.apache.org/polling-consumer.html">Polling Consumer</a>&#160;page.</p><h3 id="Scheduler-ExchangeProperties">Exchange Properties</h3><p>When the timer is fired, it adds the following information as properties to the <code>Exchange</code>:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_NAME</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The value of the <code>name</code> option.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange.TIMER_FIRED_TIME</code></p></td><td 
 colspan="1" rowspan="1" class="confluenceTd"><p><code>Date</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The time when the consumer fired.</p></td></tr></tbody></table></div></div><p>&#160;</p><h3 id="Scheduler-Sample">Sample</h3><p>To set up a route that generates an event every 60 seconds:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[   from(&quot;scheduler://foo?period=60s&quot;).to(&quot;bean:myBean?method=someMethodName&quot;);
 ]]></script>
 </div></div><p>&#160;</p><p>The above route will generate an event and then invoke the <code>someMethodName</code> method on the bean called <code>myBean</code> in the <a shape="rect" href="registry.html">Registry</a> such as JNDI or <a shape="rect" href="spring.html">Spring</a>.</p><p>And the route in Spring DSL:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">