如何使apache骆驼Quartz2 firenow持续工作

时间:2019-05-13 11:01:22

标签: apache-camel quartz-scheduler

我正在使用Quartz2,该数据库捆绑在Apache骆驼2.23.2中。我正在使用“ fireNow”功能在部署后立即触发作业。但它不能始终如一地工作。

有时它会在很长一段时间后被触发,有时又不会被触发。

该问题很少发生。我试图启用日志以找出发生了什么事情。我没有看到任何错误消息。我发现在工作和不工作之间的唯一区别是调用Consumer的顺序

工作日志

org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#na#Seting org.quartz.scheduler.jmx.export = true以确保QuartzScheduler (s)将加入JMX。| org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#Creating SchedulerFactory:1557418314584-Timer_Issue,属性:{org.quartz.scheduler.jmx。 export = true,org.quartz.scheduler.skipUpdateCheck = true,org.quartz.scheduler.instanceName = 1557418314584-Timer_Issue,org.terracotta.quartz.skipUpdateCheck = true,org.quartz.threadPool.threadCount = 1} | org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#创建并初始化调度程序。 org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#将camelContextName = Timer_Issue存储到Quartz上下文空间中。 org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#创建新的CamelJob。 org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint Event Dispatcher:1 #### na#na#na#na#na#Created jobDetail = JobDetail'Camel_Timer_Issue.TimerIssueTimerEventDefinition3719721':jobClass:'org.apache.camel .component.quartz2.CamelJob concurrentExectionDisallowed:错误persistJobDataAfterExecution:错误isDurable:错误请求恢复:false | org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#na#Creating SimpleTrigger。 org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#设置用户额外的triggerParameters {repeatCount = 0,repeatInterval = 0} | org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint Event Dispatcher:1 #### na#na#na#na#na#Created trigger = Trigger'Camel_Timer_Issue.TimerIssueTimerEventDefinition3719721':triggerClass:'org.quartz.impl .triggers.SimpleTriggerImpl日历:'null'misfire指令:1 nextFireTime:null | org.apache.camel.component.quartz2.QuartzHelper ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#na#添加camelContextName = Timer_Issue,endpointUri = quartz2:// TimerIssueTimerEventDefinition3719721?fireNow = true&trigger.repeatCount = 0&trigger.repeatInterval = 0进入作业数据映射。 org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#na#Job Camel_Timer_Issue.TimerIssueTimerEventDefinition3719721(triggerType = SimpleTriggerImpl,jobClass = CamelJob)已调度。下一个射击日期是UTC 2019 | 05月09日星期四| org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#将camelContextName = Timer_Issue存储到Quartz上下文空间中。|
” org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#启动调度程序。 org.apache.camel.component.quartz2.QuartzConsumer ## anonymous#Blueprint Event Dispatcher:1 #### na#na#na#na#na#起始使用者:Consumer [quartz2:// TimerIssueTimerEventDefinition3719721?fireNow = true&trigger.repeatCount = 0&trigger .repeatInterval = 0] | org.apache.camel.component.quartz2.CamelJob ## anonymous#1557418314584-Timer_Issue_Worker-1 #### na#na#na#na#Running CamelJob jobExecutionContext = JobExecutionContext:触发器:'Camel_Timer_Issue.TimerIssssTimerIssueTimer_IssueTimer_37_1972 :'UTC 2019 Thu May 09 16:11:56 UTC ScheduleedFireTime:UTC 2019 Thu May 09 16:11:56 UTC previous previousFireTime:'null nextFireTime:null isRecovering:false refireCount:0 | org.apache.camel.component.quartz2.CamelJob ## anonymous#1557418314584-Timer_Issue_Worker-1 #### na#na#na#na#使用triggerKey = Camel_Timer_Issue.TimerIssueTimerEventDefinition3719721 |查找现有的QuartzEndpoint “

不工作日志

INFO#org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint Event Dispatcher:1 #### na#na#na#na#na#Set org.quartz.scheduler.jmx.export = true为确保将QuartzScheduler列入JMX。 DEBUG#org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#na#Creating SchedulerFactory:1557418506499-Timer_Issue,属性:{org.quartz.scheduler。 jmx.export = true,org.quartz.scheduler.skipUpdateCheck = true,org.quartz.scheduler.instanceName = 155718506499-Timer_Issue,org.terracotta.quartz.skipUpdateCheck = true,org.quartz.threadPool.threadCount = 1} | INFO#org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#na#创建并初始化调度程序。 org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#将camelContextName = Timer_Issue存储到Quartz上下文空间中。 org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#创建新的CamelJob。 org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint Event Dispatcher:1 #### na#na#na#na#na#Created jobDetail = JobDetail'Camel_Timer_Issue.TimerIssueTimerEventDefinition3719721':jobClass:'org.apache.camel .component.quartz2.CamelJob concurrentExectionDisallowed:错误persistJobDataAfterExecution:错误isDurable:错误请求恢复:false | org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#na#Creating SimpleTrigger。 org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#设置用户额外的triggerParameters {repeatCount = 0,repeatInterval = 0} | org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint Event Dispatcher:1 #### na#na#na#na#na#Created trigger = Trigger'Camel_Timer_Issue.TimerIssueTimerEventDefinition3719721':triggerClass:'org.quartz.impl .triggers.SimpleTriggerImpl日历:'null'misfire指令:1 nextFireTime:null | org.apache.camel.component.quartz2.QuartzHelper ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#na#添加camelContextName = Timer_Issue,endpointUri = quartz2:// TimerIssueTimerEventDefinition3719721?fireNow = true&trigger.repeatCount = 0&trigger.repeatInterval = 0进入作业数据映射。 org.apache.camel.component.quartz2.QuartzEndpoint ## anonymous#Blueprint事件分派器:1 #### na#na#na#na#na#Job Camel_Timer_Issue.TimerIssueTimerEventDefinition3719721(triggerType = SimpleTriggerImpl,jobClass = CamelJob)已调度。下一个射击日期是UTC 2019 | 05月09日星期四| org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#将camelContextName = Timer_Issue存储到Quartz上下文空间中。 ” org.apache.camel.component.quartz2.QuartzComponent ## anonymous#Blueprint事件调度程序:1 #### na#na#na#na#na#启动调度程序。 org.apache.camel.component.quartz2.CamelJob ## anonymous#1557418506499-Timer_Issue_Worker-1 #### na#na#na#na#Running CamelJob jobExecutionContext = JobExecutionContext:trigger:'Camel_Timer_Issue.TimerIsssDefinition.19721 :''UTC 2019年5月9日星期四16:15:07已安排触发时间:UTC 2019年5月9日星期四16:09:07以前的防火时间:'null nextFireTime:null isRecovering:假refireCount:0 | org.apache.camel.component.quartz2.CamelJob ## anonymous#1557418506499-Timer_Issue_Worker-1 #### na#na#na#na#使用triggerKey = Camel_Timer_Issue.TimerIssueTimerEventDefinition3719721 |查找现有的QuartzEndpoint org.apache.camel.component.quartz2.QuartzConsumer ## anonymous#Blueprint Event Dispatcher:1 #### na#na#na#na#na#起始使用者:Consumer [quartz2:// TimerIssueTimerEventDefinition3719721?fireNow = true&trigger.repeatCount = 0&trigger .repeatInterval = 0] | “

我用粗体突出显示了区别。看起来CamelJob甚至在Consumer启动之前就被触发了。

0 个答案:

没有答案