Uploaded image for project: '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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.3, 2.9.0
    • 2.8.4, 2.9.0
    • camel-core
    • 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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: