[ 
https://issues.apache.org/jira/browse/CAMEL-26906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on CAMEL-26906 started by shashank.
----------------------------------------
> camel-core - an Error of a timer listener or a periodic task stops 
> TimerListenerManager, so no listener or task runs again
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26906
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26906
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: shashank
>            Assignee: shashank
>            Priority: Minor
>
> Follow-up of CAMEL-26741, named in the PR of CAMEL-26881 (the purge task of 
> the Aggregate EIP). {{TimerListenerManager}} calls its listeners from a task 
> scheduled with {{scheduleAtFixedRate}}, and catches only {{Exception}} around 
> each {{onTimer}}. An {{Error}} that is not a {{VirtualMachineError}} (such as 
> a {{NoClassDefFoundError}} or an {{AssertionError}}) thrown by one listener 
> ends the scheduled task: the executor does not schedule it again, nothing is 
> logged, and no listener is called again until the CamelContext restarts.
> Two services extend {{TimerListenerManager}}:
> * {{DefaultPeriodTaskScheduler}}, which runs the tasks scheduled with 
> {{schedulePeriodTask}}: the secret refresh tasks of the AWS, GCP, Azure Key 
> Vault and Hashicorp vaults and of Spring Cloud Config, the lock renewal of 
> the camel-azure-servicebus consumer (PEEK_LOCK) and the clipboard reload of 
> camel-jbang. An {{Error}} of one task stops all of them, for example an 
> {{Error}} of a vault refresh task also stops the lock renewal of the Service 
> Bus consumers, so the locks of long-running exchanges expire and their 
> messages are delivered again;
> * {{ManagedLoadTimer}}, which updates the load statistics of JMX when they 
> are enabled (off by default).
> CAMEL-26537 fixed the other way this timer stopped for good (a listener added 
> or removed while it runs).
> Expected: as for an exception, the {{Error}} is logged (at WARN, as the timer 
> stopped without a log line before) and ignored, so the other listeners in 
> that run and the next runs are still called; a {{VirtualMachineError}} is 
> left as before.
> Found while going through the follow-ups of CAMEL-26741; confirmed with tests 
> on the real classes ({{TimerListenerManagerTest}}, 
> {{PeriodTaskSchedulerTest}}: no listener is called after the {{Error}}).
> _Filed with Claude Code on behalf of allthingssecurity._



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to