[
https://issues.apache.org/jira/browse/CAMEL-5585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-5585.
--------------------------------
Resolution: Fixed
> RedeliverErrorHandler - Should quicker reject running scheduled redeliver
> tasks if shutting down and not allowed to do redeliver
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5585
> URL: https://issues.apache.org/jira/browse/CAMEL-5585
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.11.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Fix For: 2.18.0
>
>
> If redeliverWhileStopping=false, and we are currently sleeping before
> attempting a redelivery. Then we could interrupt the thread and reject.
> This allows to stop quicker.
> The trick is to interrupt the sleep graceful. For example to sleep in a loop
> instead, and check if we should still sleep.
> The scheduled thread pool on the other hand could have many pending tasks. So
> we would need to shutdown now, and then reject running them, eg need to set
> exception and invoke done callback.
> An alternative instead of using a scheduled thread pool. Would to have a task
> queue, and a multiplexed background thread that runs once in a while (eg
> every second). Then that could more easy reject the tasks.
> The caveat is if people use delays < 1 sec. As the thread would then need to
> be quicker. As well keep precise count when to execute the redelivery.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)