簡體   English   中英

Spring Boot Apache Camel Quartz JDBC 調度器

[英]Spring boot Apache Camel Quartz JDBC scheduler

我將 spring boot 與 apache camel 一起使用,我想創建石英調度程序,但是當我使用此配置時,什么也沒有發生:

camel:
    component:
        quartz2:
          properties:
            org:
              quartz:
                scheduler:
                  instanceName: ClusteredSchedular
                  instanceId: AUTO
                threadPool:
                  class: org.quartz.simpl.SimpleThreadPool
                  threadCount: 25
                  threadPriority: 5
                jobStore:
                  class: org.quartz.impl.jdbcjobstore.JobStoreTX
                  driverDelegateClass: org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
                  dataSource: quartz
                  isClustered: true
                  clusterCheckinInterval: 20000
                dataSource:
                  quartz:
                    driver: oracle.jdbc.driver.OracleDriver
                    URL: jdbc:oracle:thin:@localhost:1521:xe
                    user: test
                    password: test
                    maxConnections: 5
                    validationQuery: select 1 from dual

有誰知道為什么這個配置不起作用? 駱駝只能從默認配置中看到此配置

    org.quartz.scheduler.instanceName: DefaultQuartzScheduler
org.quartz.scheduler.rmi.export: false
org.quartz.scheduler.rmi.proxy: false
org.quartz.scheduler.wrapJobExecutionInUserTransaction: false

org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount: 10
org.quartz.threadPool.threadPriority: 5
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread: true

org.quartz.jobStore.misfireThreshold: 60000

org.quartz.jobStore.class: org.quartz.simpl.RAMJobStore

我更願意使用 springboot 數據源來啟用石英集群。

spring:
  datasource:
    driver-class-name: org.postgresql.Driver
    url: jdbc:postgresql://127.0.0.1:5432/postgres
    username: postgres
    password: password
  quartz:
    scheduler-name: quartzSchedulernot work anymore
    jobStoreType: jdbc
    startup-delay: PT10S
    wait-for-jobs-to-complete-on-shutdown: true
  properties:
    org.quartz.scheduler.instanceId: AUTO
    org.quartz.scheduler.jmx.export: true
    org.quartz.threadPool.threadCount: 15
    org.quartz.threadPool.threadPriority: 5
    org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
    org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread: true
    org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
    org.quartz.jobStore.tablePrefix: QRTZ_
    org.quartz.jobStore.isClustered: true
    org.quartz.jobStore.clusterCheckinInterval: 1000

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM