camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: TimerEndpoint documentation issue
Date Sat, 08 Sep 2012 15:00:04 GMT
Yeah, after checking the java.util.TaskQueue source, there is a chance the
timer is not executed immediately, if the delay is 0. If it takes 1
millisecond or more to create the task and schedule it, the execution is
skipped the first time. This is may be also the issue for the other failing
task I reported today. I will go and fix this by setting the delay to 100.
Starting with Camel 2.11 the delay is 1000 by default and we will not see
this issue anymore.

Best,
Christian

On Sat, Sep 8, 2012 at 4:47 PM, Christian Müller <
christian.mueller@gmail.com> wrote:

> Ok, thanks for the explanation.
> I'm working on another test [1] which fails which could be related to
> this. It looks like if we do not specify a delay which is greater than 0,
> the timer is executed the first time after "periode" of time. If the delay
> is 1, the timer get executed immediately the first time and the test pass.
> I will check this (downloading the source from Apple at the moment) and
> update the test and the WIKI.
>
> [1]
> https://builds.apache.org/view/A-F/view/Camel/job/Camel.2.10.x.fulltest/org.apache.camel$camel-jdbc/38/testReport/junit/org.apache.camel.component.jdbc/JdbcAnotherRouteTest/testTimerInvoked/
>
> Best,
> Christian
>
>
> On Sat, Sep 8, 2012 at 4:29 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>
>> I have removed initialDelay. It was added as a better name than delay,
>> because its only used once. But since the JDK ***** decided to call it
>> delay, then I decided to keep it as is. But the cwiki must have ****
>> up deleting. Well cwiki is not 100% up time, so I guess it could also
>> be that it was down at the time I wanted to delete it.
>>
>> On Sat, Sep 8, 2012 at 4:20 PM, Christian Müller
>> <christian.mueller@gmail.com> wrote:
>> > From [1] you can read:
>> >
>> > delay 0 / 1000 The number of milliseconds to wait before the first
>> event is
>> > generated. Should not be used in conjunction with the time option. The
>> > default value has bee n changed to 1000 from *Camel 2.11* onwards. In
>> older
>> > releases the default value is 0. initialDelay 1000 *Camel 2.10.2:* The
>> > number of milliseconds to wait before the first event is generated.
>> Should
>> > not be used in conjunction with the time option.
>> >
>> > First issue: initialDelay is not available in 2.10.2-SNAPSHOT. Is the
>> > documentation ahead of the code?
>> > Second issue: What is the purpose of this two very similar options? Is
>> one
>> > of them deprecated?
>> >
>> > [1] http://camel.apache.org/timer.html
>> >
>> > Best,
>> > Christian
>> >
>> > --
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>
>
>
> --
>
>
>


--

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message