Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-3429

Issue when using two routes with different route-id having quartz2 implementation in two different blueprint xml and different camel-context id.

XMLWordPrintable

    • % %
    • Hide
      • Download attached maven test-case camel-blueprint-quartz2.zip.
      • Build the project and deploy it in Red Hat JBoss Fuse 6.1.0 using command
        osgi:install -s mvn:com.mycompany/camel-blueprint-quartz2/1.0
        
      • Check logs, you will find that only one consumer endpoint is up at a time.
      Show
      Download attached maven test-case camel-blueprint-quartz2.zip. Build the project and deploy it in Red Hat JBoss Fuse 6.1.0 using command osgi:install -s mvn:com.mycompany/camel-blueprint-quartz2/1.0 Check logs, you will find that only one consumer endpoint is up at a time.

      • Using camel quartz2 component in different xml file with different route Id and camel-context Id in a single bundle is not working properly. Only one of the job is running while other is not getting invoked.
      • blueprint1.xml
        <camelContext id="blueprintContext1" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
            <route id="timerToLog1">
              <from uri="quartz2://report1?cron=0/2+*+*+*+*+?"/>
              <setBody>
                  <simple>I was fired at ${header.fireTime}</simple>
              </setBody>
              <log message="The message contains ${body}"/>
              <to uri="mock:result"/>
            </route>
          </camelContext>
        
      • blueprint2.xml
        <camelContext id="blueprintContext2" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
            <route id="timerToLog2">
              <from uri="quartz2://report2?cron=0/2+*+*+*+*+?"/>
              <setBody>
                  <simple>I was fired at ${header.fireTime}</simple>
              </setBody>
              <log message="The message contains ${body}"/>
              <to uri="mock:result"/>
            </route>
          </camelContext>
        
      • Following are the logs received
        09:07:16,010 | INFO  | quartz2_Worker-1 | timerToLog2                      | 142 - org.apache.camel.camel-core - 2.12.0.redhat-610379 | The message contains I was fired at Mon Jun 15 09:07:16 IST 2015
        09:07:18,003 | WARN  | quartz2_Worker-3 | CamelJob                         | 254 - org.apache.camel.camel-quartz2 - 2.12.0.redhat-610379 | Cannot find existing QuartzEndpoint with uri: quartz2://report1?cron=0%2F2+*+*+*+*+%3F. Creating new endpoint instance.
        09:07:18,007 | INFO  | quartz2_Worker-4 | timerToLog2                      | 142 - org.apache.camel.camel-core - 2.12.0.redhat-610379 | The message contains I was fired at Mon Jun 15 09:07:18 IST 2015
        09:07:20,003 | WARN  | quartz2_Worker-5 | CamelJob                         | 254 - org.apache.camel.camel-quartz2 - 2.12.0.redhat-610379 | Cannot find existing QuartzEndpoint with uri: quartz2://report1?cron=0%2F2+*+*+*+*+%3F. Creating new endpoint instance.
        09:07:20,007 | INFO  | quartz2_Worker-6 | timerToLog2                      | 142 - org.apache.camel.camel-core - 2.12.0.redhat-610379 | The message contains I was fired at Mon Jun 15 09:07:20 IST 2015
        09:07:22,003 | WARN  | quartz2_Worker-7 | CamelJob                         | 254 - org.apache.camel.camel-quartz2 - 2.12.0.redhat-610379 | Cannot find existing QuartzEndpoint with uri: quartz2://report1?cron=0%2F2+*+*+*+*+%3F. Creating new endpoint instance.
        09:07:22,005 | INFO  | quartz2_Worker-8 | timerToLog2                      | 142 - org.apache.camel.camel-core - 2.12.0.redhat-610379 | The message contains I was fired at Mon Jun 15 09:07:22 IST 2015
        
      • When using both routes within same a single blueprint.xml and within a same camel-context than there are no such problems. Both routes work fine.

              ggrzybek Grzegorz Grzybek
              rhn-support-cpandey Chandra Shekhar Pandey (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: