activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex J Lennon <>
Subject Questions about transactions with ActiveMQ
Date Sat, 05 Apr 2008 15:45:36 GMT


I've been testing out Apache NMS with MSMQ and ActiveMQ.

The test platform is a Windows XP box with and ActiveMQ 5.0.0. running 
with default settings.

I'm using client code based on that found here:

Initially I found that I got an exception when closing the session to the
message broker. Disposing the producer and consumer prior to closing
the session seems to fix that.

One of my tests is with AcknowledgementMode.Transactional. I loop, sending
a message on the producer, committing on the session and then receiving a 
message on the consumer.

This seems to work nearly correctly, but browsing the queue on the ActiveMQ
web admin page I see there is always one message left pending (although I
do receive all messages in the client).

I looked at the NMS.ActiveMQ Producer and Consumer code and see that the
producer handles transaction commits. However the consumer code doesn't
seem to handle transactions, but supports some kind of auto-acknowledge
instead (?).

My question is shouldn't the consumer support transactions on the receive()
and is this why I'm left with a message pending? Or am I just
how to use the API in transactional mode?


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

View raw message