我的应用程序中有一个骆驼路径,它由cron表达式触发。为此,我使用camel quartz2调度程序,但我不知道如何使quartz2集群,因为我们需要在多个节点上部署这个应用程序。下面是启动骆驼路线的触发点。
from("quartz2://foo?cron=1+1+1+*+*+?&trigger.timeZone=Australia/Melbourne")有人能帮我在集群环境中配置这个吗?
当我执行这条路线时,我会遵循:
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.发布于 2016-07-30 09:52:36
这是通过将org.quartz.jobStore.isClustered设置为true来实现的。以下是正式文件的引文
通过将“org.quartz.jobStore.isClustered”属性设置为“true”启用群集。集群中的每个实例都应该使用相同的quartz.properties文件副本。例外情况是使用相同的属性文件,但有以下允许的例外情况:不同的线程池大小和“org.quartz.scheduler.instanceId”属性的不同值。集群中的每个节点都必须有一个唯一的instanceId,通过将“AUTO”作为该属性的值很容易完成(而不需要不同的属性文件)。
要用Camel配置它,您必须将quartz.properties文件放在src/main/resources/org/quartz中。或者,您可以自定义Quartz组件,并提供自定义属性文件或Properties实例。看看官方骆驼文献。
发布于 2016-07-29 12:08:11
似乎你被误解了“没有开始”的信息。石英实际上是在你的情况下开始的。请等到时间满足您的cron表达式,以启动作业/申请。要查看石英的日志记录设置,到这里来看看。
https://stackoverflow.com/questions/38652945
复制相似问题