camel-users mailing list archives

On 25/06/2010 06:17, Claus Ibsen wrote:
> I think the reason is the scheduler is started before the other routes
> has been fully started. And quartz starts very quick.
>
> We could add an option so you can configure a delay option so it can
> be started with delay.
> It has a startDelayed method:
> http://www.quartz-scheduler.org/docs/api/1.8.1/org/quartz/Scheduler.html
>
>
> However a better solution is to offer this as a feature in Camel which
> allows component to register callbacks to be invoked when all the
> other stuff have been started, so they can start last.
>
>
> I have created a ticket to track that
> https://issues.apache.org/activemq/browse/CAMEL-2855
>
In my experience* one always needs to use the delay start features of
quartz because it always gets going before its dependents.
Even if you have a "start last" feature, unless you make it a complex
tree of dependencies you are going to face the situation where quartz (a
late starter) is dependent on another late starter and you still have
the race condition.
Also a start-last feature doesn't work when the thing which quartz
depends upon is outside of camel.
So a start-last feature may be a good idea, but I think camel should
probably make the delay start features of quartz available too.
Jim
* Which is restricted to using clustered quartz (and hence a persistent
store for jobs) outside of camel.