Quartz集群和redis jobStore
Quartz cluster and redis jobStore
有没有支持quartz集群的redis jobStore?
有没有人能够构建它?
另一方面,什么是石英簇?我的意思是,是否可以让两个服务 运行 同一个 quartz.properties
文件指向一个 redis?
编辑
我试过这个 redis 作业商店,但它似乎不支持石英集群:
JobStore class 'net.joelinn.quartz.jobstore.RedisJobStore' props could not be configured. [See nested exception: java.lang.NoSuchMethodException: No setter for property 'isClustered']
quartz.properties
:
org.quartz.scheduler.instanceName=office-scheduler-service
org.quartz.scheduler.instanceId=AUTO
org.quartz.jobStore.isClustered=true
org.quartz.jobStore.clusterCheckinInterval=20000
# thread-pool
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount=2
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true
org.quartz.jobStore.class = net.joelinn.quartz.jobstore.RedisJobStore
org.quartz.jobStore.host = redisbo
org.quartz.jobStore.misfireThreshold = 60000
不需要配置集群,请查看源码,已经集群了
Quartz JDBC documentation 解释了它如何处理应用程序节点集群中的执行作业。 RedisJobStore 扩展了它以利用 Redis 存储,默认情况下它将以集群模式(Quartz 集群 - 不是 Redis 集群)工作,而无需您启用它。
基本上 Quartz 使用一个共享数据库来记录哪个调度器实例当前正在处理一个作业,这与应用程序调度器之间的直接节点通信相反。当调度程序实例选择一个作业时,它会安全地将其实例 ID 注册到 运行 作业并将其保存在数据库中。作业存储的这种支持在 RedisJobStore 使用的 schema 中很明显,由 blocked_by 字段指示。
有没有支持quartz集群的redis jobStore?
有没有人能够构建它?
另一方面,什么是石英簇?我的意思是,是否可以让两个服务 运行 同一个 quartz.properties
文件指向一个 redis?
编辑
我试过这个 redis 作业商店,但它似乎不支持石英集群:
JobStore class 'net.joelinn.quartz.jobstore.RedisJobStore' props could not be configured. [See nested exception: java.lang.NoSuchMethodException: No setter for property 'isClustered']
quartz.properties
:
org.quartz.scheduler.instanceName=office-scheduler-service
org.quartz.scheduler.instanceId=AUTO
org.quartz.jobStore.isClustered=true
org.quartz.jobStore.clusterCheckinInterval=20000
# thread-pool
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount=2
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true
org.quartz.jobStore.class = net.joelinn.quartz.jobstore.RedisJobStore
org.quartz.jobStore.host = redisbo
org.quartz.jobStore.misfireThreshold = 60000
不需要配置集群,请查看源码,已经集群了
Quartz JDBC documentation 解释了它如何处理应用程序节点集群中的执行作业。 RedisJobStore 扩展了它以利用 Redis 存储,默认情况下它将以集群模式(Quartz 集群 - 不是 Redis 集群)工作,而无需您启用它。
基本上 Quartz 使用一个共享数据库来记录哪个调度器实例当前正在处理一个作业,这与应用程序调度器之间的直接节点通信相反。当调度程序实例选择一个作业时,它会安全地将其实例 ID 注册到 运行 作业并将其保存在数据库中。作业存储的这种支持在 RedisJobStore 使用的 schema 中很明显,由 blocked_by 字段指示。