activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ElwoodJones <>
Subject ActiveMQ and Camel Polling Consumer Thread Leak
Date Tue, 30 Apr 2013 12:22:03 GMT
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 =
= '" + returnQueue + "'"",
			TestMessage response = receive == null ? null :

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

I am using the Camel ConsumerTemplate, this is set in my Spring config as

<camelContext id="camelContext" trace="true"
		<consumerTemplate id="consumerTemplate"/>
		<template id="producerTemplate" />

So as per
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

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message