I am using camel-quartz component with simpleTrigger because I need to fire now on start, then every 12 hours. I have 5 minutes in the test below. simpleTrigger syntax
quartz://timerName?options
quartz://groupName/timerName?options
the way it works is there is a database that is loaded and instantiated singleton, when the database is loaded, and becomes available, it starts the below route. this route should start up, it does, execute the job upon start once, and then on each interval, this is where it fails, it does not issue another trigger for the interval.
the way I see this is fireNow=true, triggers the route on start
trigger.repeatInterval=300 establishes the period/interval between triggers
trigger.repeatCount=1 will allow 1 trigger to occur between repeatIntervals.
It starts, fires Now the first trigger, but, it doesn't trigger another event after that???
What am I doing wrong or misunderstand? thank you for your help.
fireNow=true&trigger.repeatInterval=300&trigger.repeatCount=1"
my code:
<route autoStartup="false" id="get.custkeys">
<from id="get.custkeys" uri="quartz://autoTokenService/getcustkey?fireNow=true&trigger.repeatInterval=300&trigger.repeatCount=1"/>
<process id="get.custkeys.rte" ref="tokenListLookupProcessor"/>
<split id="splitcustkey">
<tokenize token=","/>
<log id="sck1" loggingLevel="INFO" message="Custkey Requesting Token: ${body}"/>
<process id="supKey" ref="setUpKeysProcessor"/>
<throttle id="custkey_throttle" timePeriodMillis="1000">
<constant>1</constant>
<to id="getKeys" uri="seda:processCustKeys"/>
</throttle>
</split>
</route>
I think I found the answer, the trigger.repeatCount=-1 will allow the trigger event to reoccur. also, the trigger.repeatInterval is in milliSeconds.
the below, fires the trigger event when started. then after the repeatInterval, the trigger event fires again. as expected.
<route autoStartup="false" id="get.custkeys">
<from id="get.custkeys" uri="quartz://autoTokenService/getcustkey?fireNow=true&trigger.repeatInterval=120000&trigger.repeatCount=-1&trigger.misfireInstruction=2"/>
<process id="get.custkeys.rte" ref="tokenListLookupProcessor"/>
<split id="splitcustkey">
<tokenize token=","/>
<log id="sck1" loggingLevel="INFO" message="Custkey Requesting Token: ${body}"/>
<process id="supKey" ref="setUpKeysProcessor"/>
<throttle id="custkey_throttle" timePeriodMillis="1000">
<constant>1</constant>
<to id="getKeys" uri="seda:processCustKeys"/>
</throttle>
</split>
</route>