Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.8.3, 2.9.0
-
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