Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5585

RedeliverErrorHandler - Should quicker reject running scheduled redeliver tasks if shutting down and not allowed to do redeliver

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.11.0
    • 2.18.0
    • camel-core
    • None
    • Unknown

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              davsclaus Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: