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

Jeremy Ross edited comment on CAMEL-15613 at 5/1/21, 4:35 PM:
--------------------------------------------------------------

[~davsclaus] 
bq. In fixed-delay execution, each execution is scheduled relative to the 
actual execution time of the previous execution. If an execution is delayed for 
any reason (such as garbage collection or other background activity), 
subsequent executions will be delayed as well. [0]
bq. 

I no longer get this behavior unless I use synchronous=true. In prior versions, 
the delay period began after the previous execution completed. 

Edit: This could be because I used to use the salesforce synchronous=true 
option. More evidence that any async operation on a route could cause the timer 
thread to return immediately, thus starting the delay period.

[0] 
[https://docs.oracle.com/javase/7/docs/api/java/util/Timer.html#schedule(java.util.TimerTask,%20java.util.Date,%20long)|https://docs.oracle.com/javase/7/docs/api/java/util/Timer.html#schedule(java.util.TimerTask,%20java.util.Date,%20long)]


was (Author: jeremyross):
[~davsclaus] 
bq. In fixed-delay execution, each execution is scheduled relative to the 
actual execution time of the previous execution. If an execution is delayed for 
any reason (such as garbage collection or other background activity), 
subsequent executions will be delayed as well. [0]
bq. 

I no longer get this behavior unless I use synchronous=true. In prior versions, 
the delay period began after the previous execution completed. 

[0] 
[https://docs.oracle.com/javase/7/docs/api/java/util/Timer.html#schedule(java.util.TimerTask,%20java.util.Date,%20long)|https://docs.oracle.com/javase/7/docs/api/java/util/Timer.html#schedule(java.util.TimerTask,%20java.util.Date,%20long)]

> Camel Timer does not honor fixedRate=false
> ------------------------------------------
>
>                 Key: CAMEL-15613
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15613
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 3.5.0
>            Reporter: Sreejesh
>            Priority: Minor
>         Attachments: code.zip
>
>
> Noticed a different behaviour of Camel timer with 3.5.0 when compared with 
> Camel version 2.24.3. In 3.5.0. Camel timer fires events as if it is  
> fixedRate is true (even if I explicitly make it false in the Camel URL).
>  
> The same code behaves differently in Camel 2.24.3.
>  
> I am attaching sample code for 3.5.0 version.



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

Reply via email to