activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Mielke <tors...@fusesource.com>
Subject Re: Error configuration durable topic subscription using spring listener
Date Tue, 28 Aug 2012 13:26:20 GMT
Strange one indeed. 
You ConnectionFactory is Springs SingleConnectionFactory, which will only ever create a single
connection, not multiple.
Is there possibly another process using the exact same configuration (i.e. the exact same
connectionId)? 
Have you tried a different connection Id?

You may also want to configure for CACHE_CONSUMER cache level in the DefaultMessageListenerContainer,
although I don't see how this would impact your current error. 

Regards,

Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com


On Aug 25, 2012, at 3:47 AM, paul.dark wrote:

> Hi,guys:
> 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://127.0.0.1:XXXXX*
> 
> And activemq console show message continually:
> * WARN | Transport Connection to: tcp://127.0.0.1:XXXXX failed:
> java.io.EOFException
> 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://127.0.0.1
> :XXXXXX*
> 
> 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):
> <beans>
> 	
> <bean id="singleFactory"
> class="org.springframework.jms.connection.SingleConnectionFactory" >
> 	<property  name="targetConnectionFactory"
> ref="topicReceiveConnectionFactory" />
> 	<property name="clientId" value="clientId_007"/> 
> </bean>
> 	
> <bean id="topicReceiveConnectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
> 	<property name="brokerURL" value="tcp://127.0.0.1:6117" />
> </bean>
> 
> <bean id="shortMessageListner" class="XXX.MessageConsumerImpl">
> </bean>
> 	
> <bean id="shortMessageDestination"
> class="org.apache.activemq.command.ActiveMQTopic">
> 	<constructor-arg index="0" value="XXX.topic" />
> </bean>
> 
> <bean id="topicConsumerContainer"
> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
> 	<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"/> 
> </bean>
> 		
> 
> </beans>
> 
> PS: I changed much configuration methd and config value, but no effect.
> 
> THANKS IN ADVANCE!
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Error-configuration-durable-topic-subscription-using-spring-listener-tp4655560.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.






Mime
View raw message