You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by huntc <hu...@mac.com> on 2010/03/11 00:07:29 UTC

The timing of the timer component

Hi there,

Could it be that when the timer component is used it starts firing before
all of the routes have been configured?

I had a race condition where on one machine Camel complained that route X
(produced to by a timer consumer) wasn't established. On another machine
though it was fine. Moving the code around so that route X was declared
before the timer fixed the issue.

Kind regards,
Christopher
-- 
View this message in context: http://old.nabble.com/The-timing-of-the-timer-component-tp27857160p27857160.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: The timing of the timer component

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Mar 11, 2010 at 6:51 AM, huntc <hu...@mac.com> wrote:
>
> Hi Claus,
>
> I understand that route order can be configured explicitly. However should a
> route start up and start firing during configuration of the routes?
> Intuitively, I wouldn't have thought so.
>

Its all explained in chapter 13 in details.

All routes are warmed up. And then started at the very last minute.
And this happens in the order defined.

And therefore the timer could be started before the next route, but
still enough time for it to trigger and fire.
Depending on your system and how the JVM execute tasks etc.

So you can increase the initial delay of the timer to let it fire
later the first time.




> Kind regards,
> Christopher
> --
> View this message in context: http://old.nabble.com/The-timing-of-the-timer-component-tp27857160p27859605.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: The timing of the timer component

Posted by huntc <hu...@mac.com>.
Hi Claus,

I understand that route order can be configured explicitly. However should a
route start up and start firing during configuration of the routes?
Intuitively, I wouldn't have thought so.

Kind regards,
Christopher
-- 
View this message in context: http://old.nabble.com/The-timing-of-the-timer-component-tp27857160p27859605.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: The timing of the timer component

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Mar 11, 2010 at 12:07 AM, huntc <hu...@mac.com> wrote:
>
> Hi there,
>
> Could it be that when the timer component is used it starts firing before
> all of the routes have been configured?
>

Yes see this page how to control startup order of routes
http://camel.apache.org/configuring-route-startup-ordering-and-autostartup.html

And the upcoming chapter 13 in the Camel in Action book, also covers
this as well.


> I had a race condition where on one machine Camel complained that route X
> (produced to by a timer consumer) wasn't established. On another machine
> though it was fine. Moving the code around so that route X was declared
> before the timer fixed the issue.
>
> Kind regards,
> Christopher
> --
> View this message in context: http://old.nabble.com/The-timing-of-the-timer-component-tp27857160p27857160.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus