OnException should come before transacted [1].

[1]
http://camel.465427.n5.nabble.com/transacted-in-combination-with-onException-td5719591.html

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Wed, Jul 10, 2013 at 5:18 PM, swwyatt <[email protected]> wrote:

> Hi,
>
> I am having an issue with configuring a JMS route with onException. With a
> route defined similar to that below, when an exception occurs, the message
> is properly sent to myDLQ. But, when there is a transaction timeout due to
> the longRunningProcessor taking too long, the message cannot be sent to
> myDLQ (due to rollback) and the message is rollback to myQueue and
> redelivered.
>
> I can add an additional route under a new transaction in order to commit
> the
> message to myDLQ, but the message still is rolled back and redelivered.
>
> Is the a way to handle the transaction timeout in the same manner as
> onException? I just basically want to move the message to myDLQ for any
> exception including transaction timeout.
>
> v2.8.1
>
>         <camel:route>
>                 <camel:from uri="jms:queue:myQueue"></camel:from>
>                 <camel:transacted></camel:transacted>
>                 <camel:onException>
>
> <camel:exception>java.lang.Exception</camel:exception>
>
> <camel:handled><camel:constant>true</camel:constant></camel:handled>
>                         <camel:to uri="jms:queue:myDLQ"></camel:to>
>                 </camel:onException>
>                 <camel:process ref="longRunningProcessor"></camel:process>
>         </camel:route>
>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JMS-route-transaction-timeout-tp5735455.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to