Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-569

Throttler EIP - When using async delayed the scheduled thread pool should limit number of tasks to avoid eating up memory

XMLWordPrintable

      See DEV-3603

      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.

            cibsen@redhat.com Claus Ibsen
            cibsen@redhat.com Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: