camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Richards - News Systems and Architecture <>
Subject Camel Quartz2 Clustering fails due to durable jobs, has anyone got
Date Mon, 07 Oct 2013 12:03:43 GMT

I’m using Camel 2.12.1, Quartz 2.2.0, Blueprint and Mysql 5.5 in Karaf 2.3.1 and attempting
to use clustering, without any success :-(

My aim is to run multiple VMs that will load balance Quartz camel routes and fail over should
one stop (losing the odd job schedule isn't too important, but being down for more than 5-10
minutes would be unacceptable; so clustering seems a logical solution. :-)


- When I build and start the first Karaf in a Linux VM... it will start Quartz2 and begin
triggering jobs.

- When I copy the Karaf build into another VM and start Karaf (both connecting to the same
db) I get complaints about Job durability.

- If I restart the first Karaf; it no longer works with Quartz2, also complaining about Job

So, I'd really appreciate any help or experience anyone has with this; I'm hoping I'm not
the first to run Camel Quartz2 clusters and if anyone has an example set of quartz 2 properties
and a camel route that works in Blueprint, perhaps Spring (although trying to avoid going
Spring heavy); that'd be great!

Alternatively, it there's a way to wire it in in Java DSL, I can give that a go if there's
a way to hook the Camel context in from the Blueprint somehow!?

My setup is below! Would really appreciate some help on this; Camel and Quartz seem like a
great fit! :-)

The properties seem to work fine if I use Quartz without Camel (Example 13 in Quartz 2 documentation).



I have a blueprint including the following:

  <bean id="quartz2" class="org.apache.camel.component.quartz2.QuartzComponent">

    <property name="properties" ref="props" />


  <reference id="myBean" interface="" availability="mandatory" />

  <camel:camelContext id="blueprintContext" trace="true">


      <camel:from uri="quartz2://examples/example?;deleteJob=false&amp;stateful=true&amp;cron=0/10+*+*+*+*+?"

      <camel:bean ref="myBean" method="fire" />



But get the error:

Failed to create route route1: Route(route1)[[From[quartz2://examples/example?
because of Failed to resolve endpoint: quartz2://examples/example?cron=0%2F10+*+*+*+*+%3F&deleteJob=false&
due to: Jobs added with no trigger must be durable.

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: quartz2://examples/example?cron=0%2F10+*+*+*+*+%3F&deleteJob=false&
due to: Jobs added with no trigger must be durable.

Caused by: org.quartz.SchedulerException: Jobs added with no trigger must be durable.

Quartz properties:

org.quartz.scheduler.instanceName: TestScheduler

org.quartz.scheduler.skipUpdateCheck: true

org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool

org.quartz.threadPool.threadCount: 5

org.quartz.threadPool.threadPriority: 5

org.quartz.jobStore.misfireThreshold: 60000






org.quartz.dataSource.myDS.driver: com.mysql.jdbc.Driver

org.quartz.dataSource.myDS.URL: jdbc:mysql://windowshost:3306/quartz

org.quartz.dataSource.myDS.user: root

org.quartz.dataSource.myDS.password: password

org.quartz.dataSource.myDS.maxConnections: 8

org.quartz.dataSource.myDS.validationQuery: select 0

Using a feature like:


  <bundle start-level="40">mvn:org.apache.camel/camel-core/${camel.version}/jar</bundle>

  <bundle start-level="40">mvn:org.apache.camel/camel-blueprint/${camel.version}/jar</bundle>

  <bundle start-level="40">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.c3p0/${c3p0.version}/jar</bundle>

  <bundle start-level="40">mvn:org.apache.camel/camel-quartz2/${camel.version}/jar</bundle>

  <bundle start-level="40">mvn:org.quartz-scheduler/quartz/${quartz2.version}/jar</bundle>

  <bundle start-level="40">mvn:mysql/mysql-connector-java/${mysql.version}/jar</bundle>

  <bundle start-level="40">mvn:example/osgi-fragment-c3p0-mysql/${project.version}/jar</bundle>
<- fragment bundle imports Mysql driver package into C3P0 bundle


This e-mail (and any attachments) is confidential and may contain personal views which are
not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify
the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

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