activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstordeur <>
Subject Re: Transactions in ActiveMQ
Date Wed, 27 Nov 2013 10:28:26 GMT

I am neither an expert with ActiveMQ nor with JMS so what follows might be
inaccurate and the wording might not be the best, but I have been
experimenting with AMQ and I had needs that are a bit similar to yours.

When you use transaction, it is at the session level. So the consumers and
producers that you create through this session are all working in a
transaction mode.
For producers it means that messages that you send are not really sent to
the broker until you commit.
For consumers it means that the message received are not considered as
consumed on the broker side until you commit.
This page gives details about redelivery :

So for your requirement, if the crash on the client side is correctly
handled (exception catched, the session is closed properly) then using
transaction will work as you expect, all the messages received until your
last commit will be redelivered to the consumer (and you can specify a
redelivery policy to discard messages that systematically fail on client
However if the client crash is not properly handled(segfault, sigkill), the
message will  be redelivered, but it will not be considered as a redelivery
and the message is, from my experience, never moved to the dead letter
queue. I have posted a question about this here
because I find this behavior strange, so I might be misunderstanding
something here.

Hope this helps a bit.

Kind regards,

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

View raw message