activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From damjankumar <>
Subject Re: Duplicate acknowledge when using XA transactions
Date Fri, 28 Dec 2012 11:11:11 GMT
I found out why the msg ack with transactionId=null was sent after the XA
transaction finished processing the same message. When the MessageConsumer
is closed, the method ActiveMQMessageConsumer.deliverAcks() is called. 
There is a check if a session's ack mode is auto acknowledge, if the
isAutoAcknowledgeEach() is true, the ack is send (even when the session is

void deliverAcks() {
        MessageAck ack = null;
        if (deliveryingAcknowledgements.compareAndSet(false, true)) {
            if (isAutoAcknowledgeEach()) {...

This check isAutoAcknowledgeEach is always true for any XA transaction,
because ActiveMQXASession has its method isAutoAcknowledge always returning
true. Please just let me know if this is a bug, or I am doing something
totally wrong. 


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

View raw message