mule error handling
TRANSCRIPT
![Page 1: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/1.jpg)
Mule ESB Error
Handling- Karthik Selvaraj
![Page 2: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/2.jpg)
“ Faults/errors that occur within Mule
application is referred as ”EXCEPTIONS”
The Mule exceptions can be classified into 2 categories and they are SYSTEM Exceptions and MESSAGING Exceptions
What is an EXCEPTION in MULE terminology ?
![Page 3: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/3.jpg)
System Exception Strategy
⊡The system exception strategy is invoked by Mule when an error/fault happens at SYSTEM LEVEL
⊡System exception strategy is NOT customisable in Mule
⊡Some scenarios in which System exception strategy is invoked is when the connection to a FTP SERVER FAILS or when there an error during MULE APPLICATION START and STOP
What is Mule’s system exception strategy ?
![Page 4: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/4.jpg)
Messaging Exception Strategy
⊡The messaging exception strategy is invoked by Mule when an error/fault happens while processing a message
⊡When an exception happens during processing a message, the normal flow execution is stopped and the process is transferred to exception strategy
What is Mule’s messaging exception strategy ?
![Page 5: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/5.jpg)
Messaging Exception Strategy
A Mule flow without any messaging exception strategy
![Page 6: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/6.jpg)
Messaging Exception Strategy
A Mule flow with catch exception strategy
How does the messaging exception strategy work in this scenario when the
XSLT processing fails ?
![Page 7: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/7.jpg)
Messaging Exception Strategy
□When an exception occurs in the XSLT transformation, the control is passed on to the error handling flow ( catch exception strategy ) and not to the File output endpoint
□An message configured in logger component is displayed and the input message is routed to File error endpoint configured in error handling flow
![Page 8: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/8.jpg)
Messaging Exception Strategy
Exception Handling Flow
Mule Console
![Page 9: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/9.jpg)
Messaging Exception Strategy
⊡Each flow can have only ONE exception strategy
⊡A choice exception strategy can have nested exception strategy within it
What are the characteristics of
messaging exception strategy ?
![Page 10: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/10.jpg)
Messaging Exception Strategy
⊡The exception strategy can have any number of message processors within it
What are the characteristics of
messaging exception strategy ?⊡The message
processors inside a exception strategy should not throw exception as we can’t create a nested exception strategy
![Page 11: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/11.jpg)
Messaging Exception Strategy
□Default exception strategy□Catch exception strategy □Rollback exception strategy□Choice exception strategy□Reference exception strategy□Custom exception strategy□Mapping exception strategy
What are the different types of messaging exception strategies available in Mule ?
![Page 12: Mule error handling](https://reader031.vdocuments.net/reader031/viewer/2022021418/58f2c8731a28ab4e278b456d/html5/thumbnails/12.jpg)
https://www.youtube.com/karthikselvarajchannel