activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <>
Subject Re: AMQ_SCHEDULED_DELAY and transactional boundaries
Date Mon, 29 Oct 2012 14:01:02 GMT
On Fri, 2012-10-26 at 17:41 -0700, arkin wrote: 
> 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
> ok.
> 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. 

Messages sent to the scheduler aren't included in the transaction bounds
currently since they can be set to fire at some far off time in the
future there's no way for them to be linked to the transaction.  

> Thanks for your help in advance.
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

Tim Bish
Sr Software Engineer | RedHat Inc. | | 
skype: tabish121 | twitter: @tabish121

View raw message