Mule message for reading queue messages in Quartz Scheduler and forwarding to Java component

How to write a Mule stream to use Quartz Scheduler to read messages from a queue at a regular interval (cron)?

My first thread includes CXF-> Queue. I need this in my second thread: Queue-> Quartz-> Component

<quartz:inbound-endpoint jobName="ReadQIN" cronExpression="* * * * * ?" repeatInterval="0" doc:name="Quartz"> <quartz:endpoint-polling-job groupName="ReadQINGroup" jobGroupName="ReadQINJobGroup"> <quartz:job-endpoint address="jms://QIN"/> </quartz:endpoint-polling-job> </quartz:inbound-endpoint> 

It ended in org.quartz.SchedulerException: Trigger does not reference this job!

+4
source share
1 answer

If you provided "cronExpression", do not provide "repeatInterval". Also, just do not specify values ​​for "groupName" and "jobGroupName" (they are intended for extended use of the underlying Quartz infrastructure).

Applying these changes, it works fine for me:

  <quartz:inbound-endpoint jobName="ReadQIN" cronExpression="* * * * * ?" doc:name="Quartz"> <quartz:endpoint-polling-job> <quartz:job-endpoint address="jms://QIN" /> </quartz:endpoint-polling-job> </quartz:inbound-endpoint> 
+8
source

Source: https://habr.com/ru/post/1400598/


All Articles