Hi Team,

I am facing the issue where quartz doesn't start up. Is there anything
wrong with my below config?

I have also requirement where i have to suspend the job at specific time
and resume it again.

I have configured the policy using quartz as described in the link

https://camel.apache.org/manual/latest/cronscheduledroutepolicy.html

Any help or suggestions please?

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring";>

        <route routePolicyRef="testRoutePolicy">
            <from uri="Reading from queue"/> // exact names are hidden
due to security reasons
            <transacted/>
            <setHeader headerName="id">
                <simple>${in.header.id}</simple>
            </setHeader>

            <to uri="bean:beanName1"/> // exact names are hidden due
to security reasons
            <log message="Got response: ${body}"/>
            <to uri="Sending to another queue"/> // exact names are
hidden due to security reasons
        </route>

        <route routePolicyRef="testRoutePolicy">
            <from uri="Reading from queue"/>
            <transacted/>
            <setHeader headerName="id">
                <simple>${in.header.id}</simple>
            </setHeader>

            <to uri="bean:beanName2"/>
            <log message="Got response: ${body}"/>
            <to uri="bean:beanName3"/>
        </route>

        <route routePolicyRef="testRoutePolicy">
            <from uri="Reading from queue"/>
            <transacted/>

            <to uri="bean:beanName4"/>
            <to uri="Sending to another queue"/>
        </route>

    </camelContext>

    <bean id="testRoutePolicy"
class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
        <property name="routeStartTime" value="* * * * *"/>
        <property name="routeSuspendTime" value="0 30 5 ? * SUN *"/>
        <property name="routeResumeTime" value="0 0 8 ? * SUN *"/>
    </bean>

*Jboss Logs:*

29/01/20 14:13:38,701 INFO  [C3P0Registry] Initializing c3p0-0.9.5.2
[built 08-December-2015 22:06:04 -0800; debug? true; trace: 10] [main]
29/01/20 14:13:38,818 INFO  [SpringCamelContext] Apache Camel 2.19.1
(CamelContext: camel) is starting [main]
29/01/20 14:13:38,820 INFO  [ManagedManagementStrategy] JMX is enabled [main]
29/01/20 14:13:38,965 INFO  [DefaultTypeConverter] Loaded 196 type
converters [main]
29/01/20 14:13:39,018 INFO  [DefaultRuntimeEndpointRegistry] Runtime
endpoint registry is in extended mode gathering usage statistics of
all incoming and outgoing endpoints (cache limit: 1000) [main]
29/01/20 14:13:39,147 INFO  [QuartzComponent] Setting
org.quartz.scheduler.jmx.export=true to ensure QuartzScheduler(s) will
be enlisted in JMX. [main]
29/01/20 14:13:39,177 INFO  [StdSchedulerFactory] Using default
implementation for ThreadExecutor [main]
29/01/20 14:13:39,180 INFO  [SimpleThreadPool] Job execution threads
will use class loader of thread: main [main]
29/01/20 14:13:39,196 INFO  [SchedulerSignalerImpl] Initialized
Scheduler Signaller of type: class
org.quartz.core.SchedulerSignalerImpl [main]
29/01/20 14:13:39,196 INFO  [QuartzScheduler] Quartz Scheduler v.2.3.0
created. [main]
29/01/20 14:13:39,197 INFO  [RAMJobStore] RAMJobStore initialized. [main]
29/01/20 14:13:39,202 INFO  [QuartzScheduler] Scheduler meta-data:
Quartz Scheduler (v2.3.0) 'DefaultQuartzScheduler-camel' with
instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not
support persistence. and is not clustered.
 [main]
29/01/20 14:13:39,203 INFO  [StdSchedulerFactory] Quartz scheduler
'DefaultQuartzScheduler-camel' initialized from an externally provided
properties instance. [main]
29/01/20 14:13:39,203 INFO  [StdSchedulerFactory] Quartz scheduler
version: 2.3.0 [main]


-- 
Thanks & Regards ,
Jaffar Hussain

Reply via email to