activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul.dark" <>
Subject Error configuration durable topic subscription using spring listener
Date Sat, 25 Aug 2012 01:47:36 GMT
I'm using activemq(now 5.6.0, early in 5.5.0) and spring 3.1,to configure a
durable topic subscription(queue and non-durable topic I configured before
both ok).
I'm search both this forum both google, and try many solutions I can found,
but no effect.

when my tomcat complete, tomcat console continually show error message:
*Could not refresh JMS Connection for destination 'topic://xxx.topic' -
retrying in 5000 ms. Cause: Broker: localhost - Client: clientId_007 already
connected from tcp://*

And activemq console show message continually:
* WARN | Transport Connection to: tcp:// failed:
 WARN | Failed to add Connection ID:XXX-T2300-63744-1345856322767-0:353,
reason: javax.jms.InvalidClientIDException: Broker: localhost - Client:
clientId_007 already connected from tcp://

And soonly(about 1hour), tomcat will be out of memoy.

I think this must be spring attempt to create multi connection  to activemq,
but durable topic subscription need use single clientId, so my question is:
how can I create a WORKING durable topic subscription spring listener?

this is my sample spring config(jms part):
<bean id="singleFactory"
class="org.springframework.jms.connection.SingleConnectionFactory" >
	<property  name="targetConnectionFactory"
ref="topicReceiveConnectionFactory" />
	<property name="clientId" value="clientId_007"/> 
<bean id="topicReceiveConnectionFactory"
	<property name="brokerURL" value="tcp://" />

<bean id="shortMessageListner" class="XXX.MessageConsumerImpl">
<bean id="shortMessageDestination"
	<constructor-arg index="0" value="XXX.topic" />

<bean id="topicConsumerContainer"
	<property name="connectionFactory" ref="singleFactory" />
	<property name="destination" ref="shortMessageDestination" />
	<property name="messageListener" ref="shortMessageListner" />		
	<property name="pubSubDomain" value="true" />
	<property name="subscriptionDurable" value="true" />
	<property name="concurrentConsumers" value="1"/>  
	<property name="maxConcurrentConsumers" value="1"/>  
	<property name="durableSubscriptionName" value="555"/>
	<property name="receiveTimeout" value="10000"/> 


PS: I changed much configuration methd and config value, but no effect.


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

View raw message