Want to wrap this up into a test case so I can look at it on my side?

On Tue, Apr 30, 2013 at 5:22 AM, ElwoodJones <anouska.stre...@gmail.com>wrote:

> Hi There,
>
> I've been banging my head against an issue for a while now. I have a JCA
> that picks messages up from a tcp socket, puts them onto a queue and then a
> consumer within the same JCA consumes them based upon a selector as below:
>
> Exchange receive =
>
> consumer.receive("activemq:queue:testQueue.response?selector=JMSCorrelationID
> = '" + returnQueue + "'"",
>                         responseTimeout);
>                         TestMessage response = receive == null ? null :
> (TestMessage)receive.getIn().getBody();
>                         consumer.doneUoW(receive);
>
> The issue I have is that everytime this runs it leaves a TCP Transport and
> ActiveMQ Connection Thread behind, as you can imagine after a while running
> at peak load I get OutOfMemoryExceptions due to the number of running
> threads.
>
> I am using the Camel ConsumerTemplate, this is set in my Spring config as
> follows:
>
> <camelContext id="camelContext" trace="true"
> xmlns="http://camel.apache.org/schema/spring";>
>                 <consumerTemplate id="consumerTemplate"/>
>                 <template id="producerTemplate" />
>         </camelContext>
>
> So as per
>
> https://cwiki.apache.org/CAMEL/why-does-camel-use-too-many-threads-with-producertemplate.html
> I am not creating a new consumer template each time.
>
> I have tried wrapping the receive() in consumer.start() and consumer.stop()
> and this makes no difference. I am running the following versions:
>
> Camel - 2.10.2
> ActiveMQ - 5.4.3 (I have tried the above with 5.6.0 and 5.7.1 and it makes
> no difference)
> Spring - 3.0.2
>
> Does anyone have any idea what could be causing these threads to leak?
>
> Many Thanks
> Elwood
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-and-Camel-Polling-Consumer-Thread-Leak-tp4666456.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Reply via email to