Forum Home » Fuse Distributions » Fuse Mediation Router

Thread: Why File Pooler doesn't creates new threads?

This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Permlink Replies: 1 - Last Post: Aug 18, 2012 7:25 AM Last Post By: davsclaus Threads: [ Previous | Next ]

Posts: 15
Registered: 09/03/10
Why File Pooler doesn't creates new threads?
Posted: Aug 18, 2012 1:10 AM
  Click to reply to this thread Reply

I have:
from("file:" + importDir + importOpts)

the directory has above 100 files, however I don't see any more threads from this File Producer.
As importOpts I have "/?noop=true".
Yes, I see multiple camelLocks while it run, but only single thread as result.
Is the a way to enable multiple threads?
In JMX I see that pool number is 1 and maxPool is 10 for this File Consumer.

I tried to add
but, again got only 1 extra thread in new pool.
1 thread in File Pool and 1 thread my new pool
when I set
I got 10 threads that runs in parallel to process incoming Files

Why "file:" doesn't create multiple threads?
Why "threads()" doesn't increase number of threads?

What's criteria that increases number of threads in the pool? To get more then min threads.


Posts: 1,893
Registered: 10/14/08
Re: Why File Pooler doesn't creates new threads?
Posted: Aug 18, 2012 7:25 AM   in response to: mikek753 in response to: mikek753
  Click to reply to this thread Reply

The file consumer is single threaded, which most consumers are. Some have special options for concurrency such as SEDA or JMS.

The threads EIP allows you to leverage concurrency with a backing thread pool.

Read some details at

If you have a copy of the Camel in Action book then chapter 10 covers this in much more details.

And the thread pool which are used are from the JDK. So there should be plenty of docs and books out there about them. The JDK thread pools is not very aggressive, and that is why (1, 10) uses 1 thread, and only grows when the worker queue is full. You can configure the worker queue to a lower size.