You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by pmmerritt1 <pm...@gmail.com> on 2010/04/20 16:01:50 UTC

Exception following inner transaction fails to move message to DLQ

I am currently working on the error handling for my application.  I have  set
up a DLQ so that when my app throws an exception, the XA  transaction will
rollback everything and let ActiveMQ redeliver the  message to try again.
 After 6 failures, ActiveMQ will move the message  to a DLQ.  I have noticed
that it works as expected when all the work is  done inside a single XA
transaction.  However, if I start & commit a  new XA transaction (method
annotated with the Spring  TRANSACTION_REQUIRES_NEW), then throw the
exception, the message is  rolled back successfully, but never gets moved to
the DLQ and ends up in  an infinite loop! 

I am using ActiveMQ 5.3.1, Camel 2.2.0, Spring 2.5.6, and  Bitronix 1.3.3.
 My Camel route is roughly: 

<from uri="jms:queue:start1"/> 
<transacted/> 
<to uri="aProcessorAnnotatedWIth_TRANSACTION_REQUIRES_NEW"/> 
<to uri="aProcessorThatThrowsAnException"/> 
<to uri="jms:queue:end1"/> 

With the "aProcessorAnnotatedWIth_TRANSACTION_REQUIRES_NEW"  processor, the
message never hits the DLQ and my app spins indefinitely.   If I comment it
out, the message makes it to the DLQ as expected. 

Has anyone ever seen an error like this? 
-- 
View this message in context: http://old.nabble.com/Exception-following-inner-transaction-fails-to-move-message-to-DLQ-tp28287861p28287861.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.