You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by efender <er...@fender.net> on 2008/12/12 19:52:26 UTC

RE: DefaultMessageListenerContainer threading issue - possible false alert

I'm having the same issue with DefaultMessageListenerContainer endlessly
creating threads.

Active MQ 1.5.2
Spring 2.5.6

I've tried specifying the taskExecutor and executorService, but it still
burns through threads.

	<bean id="camelThreadPool"
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
		<property name="corePoolSize" value="1"/>
		<property name="maxPoolSize" value="1"/>
	</bean>

	<bean id="camelExecutorService"
class="java.util.concurrent.ScheduledThreadPoolExecutor">
		<constructor-arg value="1"/>
		<property name="maximumPoolSize" value="1"/>
	</bean>

	<bean id="camelJmsComponent"
class="org.apache.camel.component.jms.JmsComponent">
	    <property name="connectionFactory" ref="jmsCachingConnectionFactory"/>
	    <property name="taskExecutor" ref="camelThreadPool"/>
	    <property name="executorService" ref="camelExecutorService"/>
	</bean>

Any help would be appreciated.
-- 
View this message in context: http://www.nabble.com/DefaultMessageListenerContainer-threading-issue-tp18811410s22882p20981419.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: DefaultMessageListenerContainer threading issue - possible false alert

Posted by efender <er...@fender.net>.
Sample code and config here.  Very simple example that is sufficient to make
the threading issue happen.

http://rafb.net/p/G3g4wd71.html

-- 
View this message in context: http://www.nabble.com/DefaultMessageListenerContainer-threading-issue-tp18811410s22882p20981731.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: DefaultMessageListenerContainer threading issue - possible false alert

Posted by efender <er...@fender.net>.
Yes, sorry, ActiveMQ version 5.2.

I've created a very basic Eclipse project that demonstrates the issue.
http://www.mediafire.com/file/h2bmqyynwnt/CamelTest.zip

Simply launch in debug mode and watch the thread counter for
DefaultMessageListenerContainer tick away once per second.


Claus Ibsen-2 wrote:
> 
> Hi
> 
> AMQ v 1.5.2? Are you sure it's the correct version number? The latest
> release is 5.2.
> 
> Could you create a unit test sample that demonstrates this issue? It's
> much easier to get started with if we have something we can run right
> away.
> 
> And you are using the JmsComponent. But for ActiveMQ we encurage you
> to use it's component
> http://activemq.apache.org/camel/activemq.html
> 
> It's an extension for JmsComponent where it has properly configured it
> on the ActiveMQ platform.
> 
> So use this class:
> org.apache.activemq.camel.component.ActiveMQComponent
> 
> -- 
> 
> /Claus Ibsen
> Apache Camel Committer
> Blog: http://davsclaus.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/DefaultMessageListenerContainer-threading-issue-tp18811410s22882p21013155.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: DefaultMessageListenerContainer threading issue - possible false alert

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah yeah of course. If you dont define any spring bean with the id=jms
then Camel will use the default component and thats the
org.apache.camel.component.jms.JmsComponent and it's default
configuration.

So you have to override this by adding your own jms bean id, as you did.


On Mon, Dec 15, 2008 at 3:05 PM, efender <er...@fender.net> wrote:
>
> I tried using org.apache.activemq.camel.component.ActiveMQComponent and that
> had the same issue.  I've got it fixed by configuring like this:
>
>        <bean id="camelThreadPool"
> class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
>                <property name="corePoolSize" value="1"/>
>                <property name="maxPoolSize" value="1"/>
>        </bean>
>
>        <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
>            <property name="connectionFactory" ref="jmsCachingConnectionFactory"/>
>            <property name="taskExecutor" ref="camelThreadPool"/>
>        </bean>
>
> And referencing all my JMS endpoints as jms:queue:blahblah
>
>
> Claus Ibsen-2 wrote:
>>
>>
>> And you are using the JmsComponent. But for ActiveMQ we encurage you
>> to use it's component
>> http://activemq.apache.org/camel/activemq.html
>>
>> It's an extension for JmsComponent where it has properly configured it
>> on the ActiveMQ platform.
>>
>> So use this class:
>> org.apache.activemq.camel.component.ActiveMQComponent
>>
>> --
>>
>> /Claus Ibsen
>> Apache Camel Committer
>> Blog: http://davsclaus.blogspot.com/
>>
>>
>
> --
> View this message in context: http://www.nabble.com/DefaultMessageListenerContainer-threading-issue-tp18811410s22882p21014555.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/

Re: DefaultMessageListenerContainer threading issue - possible false alert

Posted by efender <er...@fender.net>.
I tried using org.apache.activemq.camel.component.ActiveMQComponent and that
had the same issue.  I've got it fixed by configuring like this:

	<bean id="camelThreadPool"
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
		<property name="corePoolSize" value="1"/>
		<property name="maxPoolSize" value="1"/>
	</bean>

	<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
	    <property name="connectionFactory" ref="jmsCachingConnectionFactory"/>
	    <property name="taskExecutor" ref="camelThreadPool"/>
	</bean>

And referencing all my JMS endpoints as jms:queue:blahblah


Claus Ibsen-2 wrote:
> 
> 
> And you are using the JmsComponent. But for ActiveMQ we encurage you
> to use it's component
> http://activemq.apache.org/camel/activemq.html
> 
> It's an extension for JmsComponent where it has properly configured it
> on the ActiveMQ platform.
> 
> So use this class:
> org.apache.activemq.camel.component.ActiveMQComponent
> 
> -- 
> 
> /Claus Ibsen
> Apache Camel Committer
> Blog: http://davsclaus.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/DefaultMessageListenerContainer-threading-issue-tp18811410s22882p21014555.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: DefaultMessageListenerContainer threading issue - possible false alert

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

AMQ v 1.5.2? Are you sure it's the correct version number? The latest
release is 5.2.

Could you create a unit test sample that demonstrates this issue? It's
much easier to get started with if we have something we can run right
away.

And you are using the JmsComponent. But for ActiveMQ we encurage you
to use it's component
http://activemq.apache.org/camel/activemq.html

It's an extension for JmsComponent where it has properly configured it
on the ActiveMQ platform.

So use this class:
org.apache.activemq.camel.component.ActiveMQComponent



On Fri, Dec 12, 2008 at 7:52 PM, efender <er...@fender.net> wrote:
>
> I'm having the same issue with DefaultMessageListenerContainer endlessly
> creating threads.
>
> Active MQ 1.5.2
> Spring 2.5.6
>
> I've tried specifying the taskExecutor and executorService, but it still
> burns through threads.
>
>        <bean id="camelThreadPool"
> class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
>                <property name="corePoolSize" value="1"/>
>                <property name="maxPoolSize" value="1"/>
>        </bean>
>
>        <bean id="camelExecutorService"
> class="java.util.concurrent.ScheduledThreadPoolExecutor">
>                <constructor-arg value="1"/>
>                <property name="maximumPoolSize" value="1"/>
>        </bean>
>
>        <bean id="camelJmsComponent"
> class="org.apache.camel.component.jms.JmsComponent">
>            <property name="connectionFactory" ref="jmsCachingConnectionFactory"/>
>            <property name="taskExecutor" ref="camelThreadPool"/>
>            <property name="executorService" ref="camelExecutorService"/>
>        </bean>
>
> Any help would be appreciated.
> --
> View this message in context: http://www.nabble.com/DefaultMessageListenerContainer-threading-issue-tp18811410s22882p20981419.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/