Camel
  1. Camel
  2. CAMEL-4786

Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.3, 2.9.0
    • Fix Version/s: 2.8.4, 2.9.0
    • Component/s: camel-core
    • Labels:
      None

      Description

      The ScheduledThreadPoolExecutor from the JDK has a flaw that it has an unbounded queue task, which mean you can keep scheduling tasks to it, and it will never reject the tasks.
      This could potential cause to eat up all memory if you add more tasks, than the thread pool can execute.

      We need to guard the thread pool, and reject tasks if a queue size has been reached.

      The default queue size in Camel is 1000, so the guard should use that option.

      http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html

        Activity

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Claus Ibsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development