camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpravin <>
Subject Camel - Quartz2
Date Fri, 09 Oct 2015 19:15:37 GMT

I am using quartz2 component to schedule a route that consumes messages from
AMQ queue using consumer template.

The requirement is to schedule this route every 5 minutes, however if for
some reason the server is down during the scheduled time, the job should run
as soon as it is up.

I have tried following options, however it not working as intended.

Option 1- 

The configuration works by manually stopping the route before scheduled time
and then starting the route after scheduled time. The quartz component
triggers the route.

If I stop the container before the scheduled time and start the container,
the route runs at the next scheduled time.

Options 2-

The scenario in option1 works as expected. However if I shutdown the server
before the scheduled time and restart I get following errors,

Error occurred during starting Camel: CamelContext(aggregateCC) due Failed
to create route consumerRoute:
Route(consumerRoute)[[From[quartz2://MyGroup/aggregateRepor... because of
Failed to resolve endpoint:
due to: Unable to store Job : 'MyGroup.myReportTimer', because one already
exists with this identification.
org.apache.camel.FailedToCreateRouteException: Failed to create route
consumerRoute: Route(consumerRoute)[[From[quartz2://MyGroup/myRepor...
because of Failed to resolve endpoint:
due to: Unable to store Job : 'MyGroup.myReportTimer', because one already
exists with this identification.

I am not able to understand why the component is trying to insert a record
for the job again if it exists. I expected it to do this check and since I
have marked it as recoverable and stateful the route should run at scheduled
time(if the server is up) or after scheduled time when the server/container
is up.

Server version - Jboss Fuse 6.2
Camel version - 2.15.1.redhat-620133

Appreciate if anyone could help resolve this issue.


View this message in context:
Sent from the Camel Development mailing list archive at

View raw message