You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/05/06 12:51:12 UTC

[jira] [Commented] (CAMEL-5585) RedeliverErrorHandler - Should quicker reject running scheduled redeliver tasks if shutting down and not allowed to do redeliver

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

Claus Ibsen commented on CAMEL-5585:
------------------------------------

This is now implemented for synchronous. If using asyncDelayed then its still the scheduled thread pool that sleeps.

> 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)