[ 
https://issues.apache.org/jira/browse/CAMEL-16563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17337585#comment-17337585
 ] 

rabee commented on CAMEL-16563:
-------------------------------

It seems this property is not working as expected, or at least what I expect 
from this property, I have added this property as suggested above to be like 
this
{code:java}
sftp://user@xxx:2222/path?&scheduler=quartz&scheduler.triggerId=files-route-trigger&scheduler.cron=0/15
 * * ? * * *&scheduler.deleteJob=false
{code}
and then I scaled up my services to 3 replicas, all information got registered 
in the database, after scaling down my services to 2 or 1, the information in 
the database tables (job details, trigger, corn trigger) got removed and the 
last replica is not able to pull from the sftp

 

Note: I have tried it on versions 3.9.0 and 2.25.1 (same behavior), here is the 
list of dependencies  
{code:java}
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-quartz</artifactId>
    <version>2.4.4</version>
</dependency>

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-spring-boot-starter</artifactId>
    <version>3.9.0</version>
</dependency>
<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-quartz-starter</artifactId>
    <version>3.9.0</version>
</dependency>
<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-ftp-starter</artifactId>
    <version>3.9.0</version>
</dependency>
<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-micrometer-starter</artifactId>
    <version>3.9.0</version>
</dependency>
{code}
So I think the correct behavior is to keep all information about the job in the 
database even after shutting down all replicas, right?

 

Thanks in advance.

> Quartz2 Cron triggers are removed upon one of the services shutdown 
> --------------------------------------------------------------------
>
>                 Key: CAMEL-16563
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16563
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-quartz2
>    Affects Versions: 2.25.1
>            Reporter: rabee
>            Priority: Minor
>
> Dear All,
> I'm using camel quartz to connect to ftp (cron based job), so the job is 
> created on (quartz job_details, quartz_trigger, and cron_quartz_trigger) 
> tables, do everything is working normally, but if one of the services 
> shutdown then all this information got removed, and the job will not pull 
> files from FTP
>  
> here is my connection url
> +sftp://user@xxx:2222/path?useUserKnownHostsFile=true&scheduler=quartz2&scheduler.triggerId=some-trigger-id&scheduler.cron=0/15+*+*+?+*+*+*+
>  
> The scenario of removing the trigger only happens for cron jobs and is not 
> happening for a simple job, is there any way to stop removing this trigger 
> upon the shutdown of the service
> (since my services are clustered and contain multiple replicas from )



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to