You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mate <mj...@expertsystems.se> on 2012/11/02 07:24:49 UTC
Why are acks sent after rollback?
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
however.
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"
class="org.apache.activemq.pool.XaPooledConnectionFactory"
destroy-method="stop">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQXAConnectionFactory"
p:brokerURL="${brokerUrl}" />
</property>
<property name="transactionManager" ref="jtaTransactionManager" />
</bean>
<bean
class="org.springframework.jms.listener.DefaultMessageListenerContainer"
p:connectionFactory-ref="jmsXaConnectionFactory"
p:transactionManager-ref="transactionManager"
p:destination="..." p:messageListener="..." />
I'm using ActiveMQ 5.6.0
Thanks in advance.
</Mattias>
--
View this message in context: http://activemq.2283324.n4.nabble.com/Why-are-acks-sent-after-rollback-tp4658629.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.