activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mate <>
Subject Why are acks sent after rollback?
Date Fri, 02 Nov 2012 06:24:49 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 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

Thanks in advance.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message