camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcin Cylke <mcl.nab...@touk.pl>
Subject Multiple durable consumers on jms topic
Date Wed, 17 Mar 2010 11:24:46 GMT

Hi

I'm having some weird behavior with JMS one-producer-multiple-consumer
situation.

I'm publishing messages to jms topic and than have multiple consumers which
poll messages from it. Each consumer is in separate SU and I'm deploying all
the components in SMX (3.3). 

The problem I'm observing is that when only one consumer is deployed, all
works fine, no matter which consumer it is. However if I deploy more than
one, only the first works, while the rest does not recive messages from the
topic.

What I see in the thread dump is:

"DefaultMessageListenerContainer-1" prio=10 tid=0x60565000 nid=0x5008
waiting on condition [0x5e283000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(Native Method)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.sleepInbetweenRecoveryAttempts(DefaultMessageListenerContainer.java:837)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:807)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:767)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:898)
	- locked <0x75d22278> (a java.lang.Object)
	at java.lang.Thread.run(Thread.java:619)

and this looks strange.

I've configured my camel jms endpoint like this:

<bean id="jmsConfig"
class="org.apache.camel.component.jms.JmsConfiguration">
        <property name="connectionFactory" ref="jmsConnectionFactory"/>
        <property name="concurrentConsumers"
value="${activations-NetiaEvent.concurrentConsumers}"/>
    </bean>
    
    <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
        <property name="configuration" ref="jmsConfig"/>
    </bean>
    
    <bean id="jmsConnectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName" value="java:/jms/connectionFactory" />
    </bean>

Since I'm deploying all the consumers on the same SMX, I have separate jms
connectionFactories for them, however don't know if it is necessary.

I'm using camel 1.4.0, and unfortunatelly am unable to upgrade.

Thanks in advance for any help.

Regards Marcin
-- 
View this message in context: http://old.nabble.com/Multiple-durable-consumers-on-jms-topic-tp27930623p27930623.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message