camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: ProducerTemplate creates too much threads
Date Tue, 20 May 2014 02:43:13 GMT
These threads live with JmsProducer, and DefaultProducerTemplate has a cached pool to hold
the reference of these producer, the default size of pool is 1000, which means you can see
lots of threads waiting there.

You can setup the property in camel context like this to reduce the size of cached pool to
force camel to shutdown the producer for you.
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
  <properties>
     <property key="CamelMaximumCachePoolSize" value="10"/>
  </properties>
...
<camelContext>

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On May 20, 2014 at 1:10:44 AM, elena (elal5@hotmail.com) wrote:
> Hi,
>  
> Our company use ActiveMQ 5.6.0 and Camel 2.10.0. We noticed that
> ProducerTemplate creates too much threads
> TemporaryQueueReplyManager[temporary]-1 and
> JmsReplyManagerTimeoutChecker[queueName] when sending requests. The threads
> have a waiting status. This causes a problem on our production system
> deployed on Linux PC. The system has dozens of queues and dozens of clients
> sending requests to get data. Is there a way to eliminate the number of
> these threads? Why they are not stopped when producer template received the
> response?
>  
> Below is the excerpt from the stack trace:
>  
> org.apache.camel.ProducerTemplate.requestBody(java.lang.String,
> java.lang.Object)
> com.sick.service.ObjectDataService.findSortListByTunnel(java.lang.String,  
> java.lang.Integer)
> ......
>  
> As recommended, we use only one camel template:
>  
> > xmlns="http://camel.apache.org/schema/spring">
>  
>  
>  
>  
>  
> Thanks,
> Elena
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/ProducerTemplate-creates-too-much-threads-tp5751299.html
 
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  


Mime
View raw message