Hi, I am starting two brokers (tcp://localhost:61616 and tcp://localhost:61626) with shared FS. One is locked out because journal is locked by the master as it should be. Then I start my Spring base web app with a TransportListener added to ActiveMQConnectionFactory. When spring is done with initialization, I see TransportListener.onCommand() being called continuously.
Now, I kill master broker and notice TransportListener.transportInterupted() called and a slave broker coming alive by obtaining access to the journal. Once that happens TransportListener.transportResumed() is called and several TransportListener.onCommand() calls are made. Then, everything stops! No more TransportListener.onCommand() calls and if I submit a new message, I can see it pending in the queue according to jmx but it is never picked up until I restart my application. There is the following note in the doc: "If you use failover, and broker dies at some point, your sends will block. Using TransportListener can help with this regard." I this note related to the issue I am observing? if yes, how how should I use TransportListener within spring container to "reset" things and what exactly do I need to reset (sharedConnection, maybe)? If the problem is within spring, why TransportListener.onCommand() is no longer called? As you can see I am not sure where the issue is but my goal is not to have to restart my app after broker failover. thanks, vadim Here is my setup: activemq-5.1.0 spring-2.5.5 <bean id="activeMQConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="failover://tcp://localhost:61616,tcp://localhost:61626"/> <property name="redeliveryPolicy" ref="jmsRedeliveryPolicy"/> <property name="prefetchPolicy" ref="jmsPrefetchPolicy"/> <property name="copyMessageOnSend" value="false"/> <property name="transportListener"> <bean class="com.adobe.jms.ActiveMQTransportListener"/> </property> </bean> <bean id="activeMQPooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop"> <property name="connectionFactory" ref="activeMQConnectionFactory"/> </bean> <bean id="defaultJmsTemplate" class="org.springframework.jms.core.JmsTemplate"> <property name="connectionFactory"> <bean class="org.springframework.jms.connection.SingleConnectionFactory"> <property name="targetConnectionFactory"> <ref local="activeMQPooledConnectionFactory" /> </property> </bean> </property> </bean> <bean id="abstractConvertListenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="activeMQConnectionFactory" /> <property name="destination" ref="convertDestination" /> <property name="messageListener" ref="convertMessageListener" /> <property name="sessionTransacted" value="true"/> <property name="cacheLevelName" value="CACHE_CONSUMER" /> <property name="exceptionListener" ref="jmsExceptionListener" /> </bean> -- View this message in context: http://www.nabble.com/sends-receives-block-during-failover-tp19415060p19415060.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.