This post helps you to understand basic things in knowing about how Mulesoft handles Errors.
Mule's Default Exception Strategy is implicitly applied to all Mulesoft Applications (Exceptions thrown within Muleflows).If we want more sophisticated or customized forms of error management, we can implement one or more exception strategies.
Mule's Default Exception Strategy is implicitly applied to all Mulesoft Applications (Exceptions thrown within Muleflows).If we want more sophisticated or customized forms of error management, we can implement one or more exception strategies.
- System Exceptions : Mule invokes System Exception Strategy when an exception is thrown at System level(i.e, when no message is involved) . For eg., During Application start-up or connection to external systems like Database, cloud connectors, Salesforce etc. fails.When exception occurs, Mule sends a notification to registered listeners/logs exception.If it is a connection failure, Reconnection Strategy is executed.System Exceptions are not configurable in Mule.
- Messaging Exception: Mule invokes Messaging Exception Strategy when an exception is thrown within a flow.
When exception is occurred within the flow , normal flow execution stops and process transfers to Message Processors within the exception Strategy.
Exception Strategy
|
Use
|
Transaction Error Handling
|
Default Exception Strategy
|
Defined and implicitly applied by
default , to handle all messaging exceptions thrown in Mule Applications
|
When message throw an exception , the
default Exception Strategy rolls back message and logs exception.
|
Catch Exception Strategy
|
Define a catch exception strategy to
customize the way Mule handles any exception. It consumes inbound messages.
|
When message throws exception, catch
Exception Strategy always commits the transaction and consumes message
|
Rollback Exception Strategy
|
It is defined to ensure that message
that throw an exception in a flow is rolled back for reprocessing (only if
message source supports redelivery) . Do not consume inbound message
|
It makes one or more attempts to
rollback message and redeliver for processing. If it exceeds attempts, then
Rollback consumes inbound message.
|
Reference Exception Strategy
|
Define a reference to refer to error
handling defined in global/catch or choice exception .
|
Reference itself never commits, never
rollback nor consume activity.
|
Choice Exception Strategy
|
Customize the way mule handles
exceptions based on message’s content.
|
Choice Exception strategy itself never
rollback/commits nor consumes.
|
No comments:
Post a Comment