On Tue, Oct 19, 2010 at 11:33 AM, Olivier.Roger <[email protected]> wrote:
>
> Hello Camel,
>
> I am trying to use a Thread Pool inside my route to call an external process
> (with camel-exec).
> to avoid overloading the server with request I wanted to created a fixed
> size thread pool to handle those calls.
>
> I expected multiple messages (up to 25 (maxpoolsize)) to be handled
> simultaneously.
> But I must have misunderstood something because It appears only 1 requested
> is handled at the time
>
> Here is my thread pool definition
>
>                <threadPool id="myPool" threadName="test"
>                                        poolSize="15" maxPoolSize="25" 
> maxQueueSize="250"/>
>
> I use it in three different locations in the route like this
>
>        <threads executorServiceRef="myPool">
>                <to     uri="exec:Batch1.bat" /> <!-- same for 2 and 3 -->
>        </threads>
>

Usually concurrency comes from the consumer. eg a web server can
service multiple requests concurrently.

What version of Camel are you using? And whats your consumer?

If you check the log you should be able to see at least its a thread
from the pool which processes the exec stuff (eg the stuff you got
inside the thread pool)


>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/ThreadPool-Howto-tp3218747p3218747.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to