activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mattias Jiderhamn <>
Subject Why are acks sent after rollback???
Date Thu, 01 Nov 2012 22:11:10 GMT
I'm trying to find the correct configuration for our first JMS setup, 
using JTA transactions for our consumer. I am unable to get redelivery 
(on RuntimeException) working, when using JTA. Using non-XA config works 

Doing a bit (understatement...) of digging, I have concluded that 
TransactionContext.rollback(Xid) is properly invoked and the rollback 
command has been sent to the broker. However, after that has been done, 
the synchronization registered in 
org.apache.activemq.ActiveMQMessageConsumer.close() is invoking 
doClose(), which in turn calls dispose() and then - because 
!session.getTransacted() - deliverAcks() which I suppose is why 
redelivery does not work.

But why does this happen???
Should session.getTransacted() really be false during rollback...?

Snippets from my Spring config:

   <bean id="jmsXaConnectionFactory" 
     <property name="connectionFactory">
       <bean class="org.apache.activemq.ActiveMQXAConnectionFactory" 
p:brokerURL="${brokerUrl}" />
     <property name="transactionManager" ref="jtaTransactionManager" />

         p:destination="..." p:messageListener="..." />

I'm using ActiveMQ 5.6.0



View raw message