Forked from cgorshing/choice-exception-strategy.xml
Created
October 20, 2016 09:50
-
-
Save schatterjee4/4aca935f1e12a5d79864d3a2814ecc4b to your computer and use it in GitHub Desktop.
Small Mule example showing a choice-exception-strategy (copied from the Mule docs)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="RouteByExceptionType"> | |
<jms:inbound-endpoint queue="in"> | |
<jms:transaction action="ALWAYS_BEGIN" /> | |
</jms:inbound-endpoint> | |
<test:component/> | |
<jms:outbound-endpoint queue="out"> | |
<jms:transaction action="ALWAYS_JOIN" /> | |
</jms:outbound-endpoint> | |
<choice-exception-strategy> | |
<catch-exception-strategy when="exception.causedBy(com.company.BusinessException)"> | |
<jms:outbound-endpoint queue="dead.letter"> | |
<jms:transaction action="ALWAYS_JOIN" /> | |
</jms:outbound-endpoint> | |
</catch-exception-strategy> | |
<rollback-exception-strategy when="exception.causedBy(com.company.NonBusinessException)"> | |
<logger level="ERROR" message="Payload failing: #[payload]"/> | |
</rollback-exception-strategy> | |
</choice-exception-strategy> | |
</flow> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment