Claus Ibsen created CAMEL-5585:
----------------------------------
Summary: 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: Future
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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira