You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by nprajeshgowda <np...@gmail.com> on 2013/07/31 06:01:16 UTC

Re: Problems using async threads

Hi,

Since it is related to the usage of threads, thought of adding my ask to the
same post.

I am using *apache-camel-2.10.2* 

I see that the thread pool is *NOT growing* . 

		<camel:route>
			<camel:from uri="jms:queue:MyQueue?concurrentConsumers=10"></camel:from>
			<camel:threads maxPoolSize="20" poolSize="2" id="myTp">
				<camel:log message="Log from xml"></camel:log>
			</camel:threads>
		</camel:route>

Java DSL

                from("jms:queue:MyQueue?concurrentConsumers=10")
		.threads(2,10)
		.delay(1000)
		.log("recieved file");

In both the cases the number of threads are not growing more than what is
given as poolSize ( in our case 2 ). Even thought the maxPoolSize is given
as 20, the number of threads remain at 2 ..

Debugged using JConsole and observed the behavior.


Is my configuration correct ? am i missing anything ? 

Br,
Rajesh



--
View this message in context: http://camel.465427.n5.nabble.com/Problems-using-async-threads-tp3025934p5736534.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Problems using async threads

Posted by nprajeshgowda <np...@gmail.com>.
Yes, that was the reason. Now after decreasing the queue size i see the
threads are growing.

Thanks.


Br,
Rajesh



--
View this message in context: http://camel.465427.n5.nabble.com/Problems-using-async-threads-tp3025934p5736573.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Problems using async threads

Posted by Claus Ibsen <cl...@gmail.com>.
Set a lower queue size as that is default 1000.
The pool on grows when the queue size is full. This is how the thread
pools in the JDK was designed.

On Wed, Jul 31, 2013 at 6:01 AM, nprajeshgowda <np...@gmail.com> wrote:
> Hi,
>
> Since it is related to the usage of threads, thought of adding my ask to the
> same post.
>
> I am using *apache-camel-2.10.2*
>
> I see that the thread pool is *NOT growing* .
>
>                 <camel:route>
>                         <camel:from uri="jms:queue:MyQueue?concurrentConsumers=10"></camel:from>
>                         <camel:threads maxPoolSize="20" poolSize="2" id="myTp">
>                                 <camel:log message="Log from xml"></camel:log>
>                         </camel:threads>
>                 </camel:route>
>
> Java DSL
>
>                 from("jms:queue:MyQueue?concurrentConsumers=10")
>                 .threads(2,10)
>                 .delay(1000)
>                 .log("recieved file");
>
> In both the cases the number of threads are not growing more than what is
> given as poolSize ( in our case 2 ). Even thought the maxPoolSize is given
> as 20, the number of threads remain at 2 ..
>
> Debugged using JConsole and observed the behavior.
>
>
> Is my configuration correct ? am i missing anything ?
>
> Br,
> Rajesh
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Problems-using-async-threads-tp3025934p5736534.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen