...
Where name of the Timer object which is created and shared across endpoints. So if you use the same name for all your timer endpoints then only one Timer object & thread will be used.
Notice: The IN body of the generated exchange is null
. So exchange.getIn().getBody()
returns null
.
Options
Where options is a query string that can specify any of the following parameters:
...
Name | Type | Description |
---|---|---|
org.apache.camel.timer.name | String | the name option |
org.apache.camel.timer.time | Date | the time option |
org.apache.camel.timer.period | long | the period option |
org.apache.camel.timer.firedTime | Date | Camel 1.5: the current time when the consumer fired |
...
Code Block | ||||
---|---|---|---|---|
| ||||
from("timer://foo?fixedRate=true&period=60000").to("bean:myBean?methodNamemethod=someMethodName"); |
The above route will generate an event then invoke the someMethodName on the bean called myBean in the Registry such as JNDI or Spring.
And the route in Spring DSL:
Code Block | ||||
---|---|---|---|---|
| ||||
<route>
<from uri="timer://foo?fixedRate=true&period=60000"/>
<to uri="bean:myBean?method=someMethodName"/>
</route>
|
Include Page | ||||
---|---|---|---|---|
|
...