You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bigbear <st...@gmail.com> on 2011/03/14 21:43:54 UTC

activemq component settings

Hi,

I have a route that starts as follows:

from("activemq:topic:myTopic?clientId=myClientId&durableSubscriptionName=myDurableSubscriber&cacheLevelName=CACHE_NONE")

I am getting a warning as follows:
WARN listener.DefaultMessageListenerContainer: Setup of JMS message listener
invoker failed for destination 'myTopic' - trying to recover. Cause: You
cannot create a durable subscriber without specifying a unique clientID on a
Connection

The following parameter combinations work:

from("activemq:topic:myTopic?clientId=myClientId&durableSubscriptionName=myDurableSubscriber")
=> w/o cacheLevelName
from("activemq:topic:myTopic?cacheLevelName=CACHE_NONE") => w/o clientId and
durableSubscriberName.

>From my tests, I see that *not* using CACHE_NONE results in
using LocallyExposedJmsResourceHolder which is *not* what I need since I am
using XA transactions.
Also, I need durable subscription so I need to pass both clientId and
durableSubscriptionName.

Camel: 2.6.0
GlassFish: 2.1.1
ActiveMQ: 5.4.2

config:

          <tx:jta-transaction-manager />

<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="connectionFactory" ref="activemqXaConnectionFactory" />
<property name="transacted" value="true" />
<property name="transactionManager" ref="transactionManager" />
</bean>

<bean id="activemqXaConnectionFactory"
class="org.apache.activemq.ActiveMQXAConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616" />
</bean>

Could some one please let me know what is wrong here?

Thanks!

Re: activemq component settings

Posted by Ashwin Karpe <ak...@fusesource.com>.
Hi,

What you are running into is an issue related to the JMS Spring Template
where setting the cache level to none actually gets rid of the connection
and session object per invocation thereby losing any knowledge of its
precious connection (aka Memento). While a pool may indeed exist the
connections are constantly recycled and hence the amnesia. This is what is
causing your issue.

If you can set the cache level to something higher than non such as 3 then
it should work...

Cheers,

Ashwin... 

-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
--
View this message in context: http://camel.465427.n5.nabble.com/activemq-component-settings-tp3608208p3705159.html
Sent from the Camel - Users mailing list archive at Nabble.com.