You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by willome <g....@gmail.com> on 2009/05/22 19:05:22 UTC
Spring-ActiveMQ : consumer not destroyed and messages not consumed
Hi,
We are using a J2EE webapp with Spring 2.5 under Tomcat6 and 2 standalone
activeMQ servers 5.2 (with some failover).
A problem occurs when we stop our application : the consumer on activeMQ is
not destroyed. So when we restart the webapp, a new consumer is created but
unfortunately messages are not consumed anymore.
I do not know if it is a Spring problem or an activeMQ one.
Simple Spring configuration (applicationContext.xml) :
<bean id="AQconnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory"
destroy-method="stop">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL"
value="failover:(tcp://192.168.0.2:61616,tcp://192.168.0.3:61616)"/>
</bean>
</property>
</bean>
<bean id="listenerContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer"
destroy-method="doShutdown">
<property name="concurrentConsumers" value="1"/>
<property name="connectionFactory" ref="AQconnectionFactory"/>
<property name="destinationName" value="queue1,queue2"/>
<property name="messageListener" ref="asyncJmsListener"/>
</bean>
Any help would be appreciated. Thanks.
G.
--
View this message in context: http://www.nabble.com/Spring-ActiveMQ-%3A-consumer-not-destroyed-and-messages-not-consumed-tp23674585p23674585.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Spring-ActiveMQ : consumer not destroyed and messages not
consumed
Posted by willome <g....@gmail.com>.
After looking in jira, I suspect my problem is the same as this one :
https://issues.apache.org/activemq/browse/AMQ-1045
This bug is still opened.
willome wrote:
>
> Hi,
>
> We are using a J2EE webapp with Spring 2.5 under Tomcat6 and 2 standalone
> activeMQ servers 5.2 (with some failover).
>
> A problem occurs when we stop our application : the consumer on activeMQ
> is not destroyed. So when we restart the webapp, a new consumer is created
> but unfortunately messages are not consumed anymore.
>
> I do not know if it is a Spring problem or an activeMQ one.
>
> Simple Spring configuration (applicationContext.xml) :
>
> <bean id="AQconnectionFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory"
> destroy-method="stop">
> <property name="connectionFactory">
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL"
> value="failover:(tcp://192.168.0.2:61616,tcp://192.168.0.3:61616)"/>
> </bean>
> </property>
> </bean>
>
> <bean id="listenerContainer"
> class="org.springframework.jms.listener.DefaultMessageListenerContainer"
> destroy-method="doShutdown">
> <property name="concurrentConsumers" value="1"/>
> <property name="connectionFactory" ref="AQconnectionFactory"/>
> <property name="destinationName" value="queue1,queue2"/>
> <property name="messageListener" ref="asyncJmsListener"/>
> </bean>
>
> Any help would be appreciated. Thanks.
>
>
> G.
>
>
>
>
>
>
>
>
--
View this message in context: http://www.nabble.com/Spring-ActiveMQ-%3A-consumer-not-destroyed-and-messages-not-consumed-tp23674585p23706136.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.