Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.15.0
-
None
-
Unknown
Description
There seems to be a peculiarity with fault processing when a route consists of a single TryProcessor and the MEP for an exchange is InOut. The TryProcessor will iterate over any number of processors defined inside of it and during each iteration it sets the out msg to the in msg and clears the out msg reference. The end result of this is that when the route completes, the out reference is cleared and Exchange.isFailed() will return false (it checks the out message for fault status). Here’s where things get interesting, if I add a single processor after the doTry block, some logic in Pipeline kicks in that copies the in message to the out message for InOut MEPs before ending the route.
I have included a unit test which demonstrates the expected behavior and current (unexpected) behavior. The expected behavior test fails and the unexpected behavior test passes. Additional details can be found as comments in the unit test and the camel configuration containing the routes under test.