1 Reply Latest reply on Aug 18, 2012 3:25 AM by Claus Ibsen

    Why File Pooler doesn't creates new threads?

    mikek753_michael.korolyov Newbie



      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.



        • 1. Re: Why File Pooler doesn't creates new threads?
          Claus Ibsen Master



          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.