[
https://issues.apache.org/jira/browse/CAMEL-17446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470792#comment-17470792
]
Karen Lease commented on CAMEL-17446:
-------------------------------------
I'll look into updating the documentation. It's mainly an issue with short
intervals which are perhaps not that common. In any case, I notice the first
run of the trigger takes longer to launch (20 to 30 msec in the test case) than
the remaining ones, so the first one always appears to be delayed.
Regarding the timestamp for the next fire time log, I see it depends on the
actual logging implementation used; in the test case which uses log4j it is
displaying the msec which helps to understand the issue. I'd suggest forcing
the format when constructing the log message.
But is it normal not to set the triggerStartDelay when it's positive? The
current code will only set it to some time in the past, likely causing several
events to be generated immediately when the scheduler is started.
> Trigger start time for Quartz causes confusion with short trigger intervals
> ---------------------------------------------------------------------------
>
> Key: CAMEL-17446
> URL: https://issues.apache.org/jira/browse/CAMEL-17446
> Project: Camel
> Issue Type: Bug
> Components: camel-quartz
> Affects Versions: 3.13.0
> Reporter: Karen Lease
> Priority: Minor
>
> An issue reported on the users list shows that using
> trigger.repeatInterval=1200 causes the first 2 events to be fired sooner than
> expected after the scheduler is started.
> This is due to the delay between creating the Quartz Trigger and when the
> scheduler is started.
> Changing the log message to show the milliseconds in the trigger's next fire
> time would be helpful. In addition, it appears counter-intuitive that
> triggerStartDelay is ignored if positive, as shown in
> QuartzEndpoint.createTrigger() below:
> {code:java}
> if (getComponent().getScheduler().isStarted() || triggerStartDelay < 0) {
> triggerBuilder.startAt(new Date(System.currentTimeMillis() +
> triggerStartDelay));
> }{code}
> Is this intentional?
--
This message was sent by Atlassian Jira
(v8.20.1#820001)