activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manasm <man...@nrifintech.com>
Subject How retry is working in ActiveMQ - "Master/Slave" configuration with failover protocol
Date Mon, 02 Feb 2015 11:23:53 GMT
We have a application which is configured with the "Master/Slave" Active MQ
failover protocol.
But while testing the Failover scenarios sometime switch-over between Master
and Slave is working fine but some time we faced following exception and our
programs throw Exception.
How can we track/sure that activeMQ  fail over retry is working?
We are using:
a. apache-activemq version -> 5.6.0
b. java version -> 1.6.0_31

1. Sometimes we got this type of exception.
javax.jms.TransactionRolledBackException: Transaction completion in doubt
due to failover. Forcing rollback of
TX:ID:srilanka-testing1-42758-1422616254934-1:1:308
        at
org.apache.activemq.state.ConnectionStateTracker.restoreTransactions(ConnectionStateTracker.java:229)
        at
org.apache.activemq.state.ConnectionStateTracker.restore(ConnectionStateTracker.java:167)
        at
org.apache.activemq.transport.failover.FailoverTransport.restoreTransport(FailoverTransport.java:783)
        at
org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:958)
        at
org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:138)
        at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
        at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
		
2. Sometimes we got also this type of exception
javax.jms.TransactionRolledBackException: rolling back transaction
(TX:ID:srilanka-testing1-51791-1422616379414-1:1:250) post failover
recovery. 1 previously delivered message(s) not replayed to consumer:
ID:srilanka-testing1-51791-1422616379414-1:1:1:250
        at
org.apache.activemq.ActiveMQMessageConsumer.rollbackOnFailedRecoveryRedelivery(ActiveMQMessageConsumer.java:1105)
        at
org.apache.activemq.ActiveMQMessageConsumer.acknowledge(ActiveMQMessageConsumer.java:1037)
        at
org.apache.activemq.ActiveMQMessageConsumer$5.beforeEnd(ActiveMQMessageConsumer.java:1001)
        at
org.apache.activemq.TransactionContext.beforeEnd(TransactionContext.java:202)
        at
org.apache.activemq.TransactionContext.commit(TransactionContext.java:304)
        at
org.apache.activemq.ActiveMQSession.commit(ActiveMQSession.java:561)
        at
org.apache.activemq.ActiveMQQueueSession.commit(ActiveMQQueueSession.java:72)
        at
com.nri.xenos.inf.TxnResources.commitQueueSessions(TxnResources.java:455)
        at
com.nri.xenos.inf.TxnResources.doTwoPhaseCommit(TxnResources.java:362)
        at com.nri.xenos.inf.TxnResources.commit(TxnResources.java:237)
        at com.nri.xenos.inf.TxnManager.commit(TxnManager.java:247)
        at
com.nri.xenos.inf.XenosUserTransaction.commit(XenosUserTransaction.java:134)
        at
com.nri.xenos.cli.services.impl.MessageRunner.task(MessageRunner.java:235)
        at
com.nri.xenos.inf.console.launcher.ServiceRunnerBase.serviceInternal(ServiceRunnerBase.java:251)
        at
com.nri.xenos.inf.console.launcher.ServiceRunnerBase.run(ServiceRunnerBase.java:142)
        at java.lang.Thread.run(Thread.java:662)




--
View this message in context: http://activemq.2283324.n4.nabble.com/How-retry-is-working-in-ActiveMQ-Master-Slave-configuration-with-failover-protocol-tp4690808.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message