activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arkin <>
Subject AMQ_SCHEDULED_DELAY and transactional boundaries
Date Sat, 27 Oct 2012 00:41:36 GMT
I have observed that when sending delayed delivery messages (with
AMQ_SCHEDULED_DELAY values in the header), ActiveMQ does not seem to be
including the delivery in the original transaction. This results in
duplicate messages being delivered in my setup. Here is how I tested:
1. Send a message to a Q1.
2.a Consumer starts a transaction and reads message from Q1.
2.b Consumer sends the message to a retry queue Q2 with AMQ_SCHEDULED_DELAY
header in the same transaction.
2.c Consumer crashes before it can commit the transaction.
But I can see both messages after AMQ_SCHEDULED_DELAY despite the
transaction not being committed. So first message was not dequeued from Q1,
since the transaction was not committed, but the second message is delivered
to Q2 despite the transaction not being committed.

When I try the same test without the delay, the second message does not get
delivered as expected. This makes me think that my transaction management is

I could not find anything that indicates that delayed/scheduled delivery of
messages will not participate in transactions in docs or on forums. So I
wanted to check with the experts what the expected behavior is. 

Thanks for your help in advance.

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

View raw message