SlideShare a Scribd company logo
Mule ESB – Error Handling
Mule ESB provides numerous options for handling errors.
Faults that occur within Mule are referred to as exceptions;
when an activity in your Mule instance fails, Mule throws an
exception. To manage these exceptions, Mule allows you to
configure exception strategies.
Default exception strategy
 It implicitly applies to all Mule applications — manages
errors (i.e. thrown exceptions) in Mule flows. When your
flows require more sophisticated error management, you can
implement one or more exception strategies to construct
precise, efficient protocols for handling errors.
 Mule ESB’s default exception strategy implicitly and globally
handles all messaging exceptions that are thrown in Mule
applications. You can override Mule’s default exception
strategy by adding a catch, rollback, or choice exception
strategy to a flow. Otherwise, when an exception is thrown in
a flow, Mule automatically rolls back any pending transaction
and logs the exception; if no transaction is involved, the
default exception strategy simply logs the exception.
Error Types :
1. System Exceptions
 Mule invokes a System Exception Strategy when an
exception is thrown at the system-level (i.e., when no
message is involved, exceptions are handled by system
exception strategies). For example, system exception
strategies handle exceptions that occur:
 During application start-up
 When a connection to an external system fails
2. Messaging Exceptions :
Mule invokes a Messaging Exception Strategy whenever an
exception is thrown within a flow (i.e., whenever a message is
involved, exceptions are handled by messaging exception
 When a message being processed through a Mule flow throws
exception, normal flow execution stops and processes transfers
the message processor sequence within the exception strategy.
You can incorporate any number of message processors – and in
one case, other exception strategies – into an exception strategy
to handle the exception precisely as you wish. The diagram
illustrates what happens when a message throws an exception.
Messaging Exceptions Flow :
Types of messaging exception strategies :
 Default Exception Strategy
 Catch exception strategy
 Rollback exception strategy
 Reference exception strategy
 Choice exception strategy
Default Exception Strategy :
Use :
 Defined and implicitly
applied by default to
handle all messaging
exceptions that are thrown
in Mule applications
Transaction Error
Handling :
 When a message throws
an exception, the default
exception strategy rolls
back the message and logs
the exception.
Catch Exception Strategy :
Use :
 When a message throws
an exception, the default
exception strategy rolls
back the message and logs
the exception.
Transaction Error
Handling :
 When a message throws
an exception, the catch
exception
strategyalways commits
the transaction and
consumes the message.
Rollback Exception Strategy :
Use :
 Define a rollback exception
strategy to ensure that a
message that throws an
exception in a flow is
rolled back for
reprocessing (if the
message source supports
redelivery). Rollback
exception strategies do
not consume inbound
messages.
Transaction Error
Handling :
 When a message throws an
exception, the rollback
exception strategy makes
one or more attempts to
rollback the message and
redeliver it for processing (if
the message source
supports redelivery). If the
message exceeds its
redelivery attempts, then
the rollback exception
strategy commits the failed
transaction and consumes
the message.
Reference Exception Strategy :
Use :
 Define a reference
exception strategy to refer
and adhere to the error
handling parameters
defined in a global catch,
rollback or choice
exception strategy.
Transaction Error
Handling :
 When a message throws an
exception, the reference
exception strategy refers
and adheres to the error
handling parameters
defined in a global catch,
rollback or choice exception
strategy. (The reference
exception strategy itself
never actually performs any
rollback, commit, or
consume activities.)
Choice Exception Strategy :
Use :
 Define a choice exception
strategy to customize the
way Mule handles a
message that throws an
exception based on the
message’s content at the
moment it throws the
exception.
Transaction Error
Handling :
 When a message throws
an exception, the choice
exception strategy makes
a decision about where to
route the message for
further processing. (The
choice exception strategy
itself never actually
performs any rollback,
commit, or consume
activities.)
Characteristics of messaging exception strategies:
 Each flow can contain only one exception strategy.
 Each exception strategy can contain any number of
message processors.
 Choice exception strategies can contain one or more catch
and/or rollback exception strategies. (Rollback and catch
exception strategies cannot, however, contain other
exception strategies.)
Thank Q

More Related Content

What's hot

Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling
Sindhu VL
 
Mule error handling
Mule error handlingMule error handling
Mule error handling
Karthik Selvaraj
 
Mule concepts exception strategies
Mule concepts exception strategiesMule concepts exception strategies
Mule concepts exception strategies
kunal vishe
 
Error Handling Framework in Mule ESB
Error Handling Framework in Mule ESBError Handling Framework in Mule ESB
Error Handling Framework in Mule ESB
Sashidhar Rao GDS
 
Exception handling basics in mule
Exception handling basics in muleException handling basics in mule
Exception handling basics in mule
himajareddys
 
Mule exceptions Strategy
Mule exceptions StrategyMule exceptions Strategy
Mule exceptions Strategy
Padmanabhan Natarajan, CSM
 
Anypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error HandlingAnypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error Handling
Mani Rathnam Gudi
 
Mule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception StrategyMule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception Strategy
Ankush Sharma
 
Mule soft exception
Mule soft exceptionMule soft exception
Mule soft exception
Son Nguyen
 

What's hot (9)

Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling
 
Mule error handling
Mule error handlingMule error handling
Mule error handling
 
Mule concepts exception strategies
Mule concepts exception strategiesMule concepts exception strategies
Mule concepts exception strategies
 
Error Handling Framework in Mule ESB
Error Handling Framework in Mule ESBError Handling Framework in Mule ESB
Error Handling Framework in Mule ESB
 
Exception handling basics in mule
Exception handling basics in muleException handling basics in mule
Exception handling basics in mule
 
Mule exceptions Strategy
Mule exceptions StrategyMule exceptions Strategy
Mule exceptions Strategy
 
Anypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error HandlingAnypoint Studio - Mule ESB Error Handling
Anypoint Studio - Mule ESB Error Handling
 
Mule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception StrategyMule exception strategies - Reference Exception Strategy
Mule exception strategies - Reference Exception Strategy
 
Mule soft exception
Mule soft exceptionMule soft exception
Mule soft exception
 

Similar to Mule error handling

A short introduction on error handling in anypoint studio
A short introduction on error handling in anypoint studioA short introduction on error handling in anypoint studio
A short introduction on error handling in anypoint studio
Swapnil Sahu
 
Mule exception strategies
Mule exception strategiesMule exception strategies
Mule exception strategies
Krishna_in
 
Exception strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint StudioException strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint Studio
Jitendra Bafna
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
Son Nguyen
 
Mule error handling
Mule  error handlingMule  error handling
Mule error handling
chandu1443
 
Mule error handling_rollback exception strategy
Mule error handling_rollback exception strategyMule error handling_rollback exception strategy
Mule error handling_rollback exception strategy
kunal vishe
 
Mule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception StrategyMule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception Strategy
Ankush Sharma
 
Mule exception handlingstrategies
Mule exception handlingstrategiesMule exception handlingstrategies
Mule exception handlingstrategies
D.Rajesh Kumar
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-july
Vikalp Bhalia
 
Synchronous verses asynchronous processing strategy in mule esb
Synchronous verses asynchronous processing strategy in mule esbSynchronous verses asynchronous processing strategy in mule esb
Synchronous verses asynchronous processing strategy in mule esb
VishnuAnji
 
Online Spanish meetup #1
Online Spanish meetup #1Online Spanish meetup #1
Online Spanish meetup #1
Alexandra N. Martinez
 
Elements in a muleflow
Elements in a muleflowElements in a muleflow
Elements in a muleflow
Thang Loi
 
Elements in a mule flow
Elements in a mule flowElements in a mule flow
Elements in a mule flow
Sindhu VL
 
Mule scopes&error handling
Mule scopes&error handlingMule scopes&error handling
Mule scopes&error handling
Sumit Gole
 
Cache scope and strategy
Cache scope and strategy Cache scope and strategy
Cache scope and strategy
Harish43
 
Mule esb flow processing strategies
Mule esb flow processing strategiesMule esb flow processing strategies
Mule esb flow processing strategies
himajareddys
 
Cachescope
CachescopeCachescope
Cachescope
ChittipoluKeshav
 
1st Feb 2020 MuleSoft Meetup
1st Feb 2020 MuleSoft Meetup1st Feb 2020 MuleSoft Meetup
1st Feb 2020 MuleSoft Meetup
Pankaj Goyal
 
10135 a 09
10135 a 0910135 a 09
10135 a 09
Bố Su
 
Muleflowarchitecturepart2
Muleflowarchitecturepart2Muleflowarchitecturepart2
Muleflowarchitecturepart2
vijaynerd
 

Similar to Mule error handling (20)

A short introduction on error handling in anypoint studio
A short introduction on error handling in anypoint studioA short introduction on error handling in anypoint studio
A short introduction on error handling in anypoint studio
 
Mule exception strategies
Mule exception strategiesMule exception strategies
Mule exception strategies
 
Exception strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint StudioException strategies in MuleSoft Anypoint Studio
Exception strategies in MuleSoft Anypoint Studio
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
 
Mule error handling
Mule  error handlingMule  error handling
Mule error handling
 
Mule error handling_rollback exception strategy
Mule error handling_rollback exception strategyMule error handling_rollback exception strategy
Mule error handling_rollback exception strategy
 
Mule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception StrategyMule exception strategies - Choice Exception Strategy
Mule exception strategies - Choice Exception Strategy
 
Mule exception handlingstrategies
Mule exception handlingstrategiesMule exception handlingstrategies
Mule exception handlingstrategies
 
Vancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-julyVancouver mulesoft meetup_23-july
Vancouver mulesoft meetup_23-july
 
Synchronous verses asynchronous processing strategy in mule esb
Synchronous verses asynchronous processing strategy in mule esbSynchronous verses asynchronous processing strategy in mule esb
Synchronous verses asynchronous processing strategy in mule esb
 
Online Spanish meetup #1
Online Spanish meetup #1Online Spanish meetup #1
Online Spanish meetup #1
 
Elements in a muleflow
Elements in a muleflowElements in a muleflow
Elements in a muleflow
 
Elements in a mule flow
Elements in a mule flowElements in a mule flow
Elements in a mule flow
 
Mule scopes&error handling
Mule scopes&error handlingMule scopes&error handling
Mule scopes&error handling
 
Cache scope and strategy
Cache scope and strategy Cache scope and strategy
Cache scope and strategy
 
Mule esb flow processing strategies
Mule esb flow processing strategiesMule esb flow processing strategies
Mule esb flow processing strategies
 
Cachescope
CachescopeCachescope
Cachescope
 
1st Feb 2020 MuleSoft Meetup
1st Feb 2020 MuleSoft Meetup1st Feb 2020 MuleSoft Meetup
1st Feb 2020 MuleSoft Meetup
 
10135 a 09
10135 a 0910135 a 09
10135 a 09
 
Muleflowarchitecturepart2
Muleflowarchitecturepart2Muleflowarchitecturepart2
Muleflowarchitecturepart2
 

More from VirtusaPolaris

Mule m unit
Mule m unitMule m unit
Mule m unit
VirtusaPolaris
 
Mule debugging
Mule debuggingMule debugging
Mule debugging
VirtusaPolaris
 
Mule connectors-part 1
Mule connectors-part 1Mule connectors-part 1
Mule connectors-part 1
VirtusaPolaris
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
VirtusaPolaris
 
Mule basics
Mule basicsMule basics
Mule basics
VirtusaPolaris
 
Mule flatfile-json
Mule flatfile-jsonMule flatfile-json
Mule flatfile-json
VirtusaPolaris
 
Mule copy book-tutorial
Mule copy book-tutorialMule copy book-tutorial
Mule copy book-tutorial
VirtusaPolaris
 
Mule xml java
Mule xml javaMule xml java
Mule xml java
VirtusaPolaris
 
Mule ESB - Demo
Mule ESB - DemoMule ESB - Demo
Mule ESB - Demo
VirtusaPolaris
 

More from VirtusaPolaris (9)

Mule m unit
Mule m unitMule m unit
Mule m unit
 
Mule debugging
Mule debuggingMule debugging
Mule debugging
 
Mule connectors-part 1
Mule connectors-part 1Mule connectors-part 1
Mule connectors-part 1
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
 
Mule basics
Mule basicsMule basics
Mule basics
 
Mule flatfile-json
Mule flatfile-jsonMule flatfile-json
Mule flatfile-json
 
Mule copy book-tutorial
Mule copy book-tutorialMule copy book-tutorial
Mule copy book-tutorial
 
Mule xml java
Mule xml javaMule xml java
Mule xml java
 
Mule ESB - Demo
Mule ESB - DemoMule ESB - Demo
Mule ESB - Demo
 

Recently uploaded

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 

Recently uploaded (20)

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 

Mule error handling

  • 1. Mule ESB – Error Handling
  • 2. Mule ESB provides numerous options for handling errors. Faults that occur within Mule are referred to as exceptions; when an activity in your Mule instance fails, Mule throws an exception. To manage these exceptions, Mule allows you to configure exception strategies.
  • 3. Default exception strategy  It implicitly applies to all Mule applications — manages errors (i.e. thrown exceptions) in Mule flows. When your flows require more sophisticated error management, you can implement one or more exception strategies to construct precise, efficient protocols for handling errors.  Mule ESB’s default exception strategy implicitly and globally handles all messaging exceptions that are thrown in Mule applications. You can override Mule’s default exception strategy by adding a catch, rollback, or choice exception strategy to a flow. Otherwise, when an exception is thrown in a flow, Mule automatically rolls back any pending transaction and logs the exception; if no transaction is involved, the default exception strategy simply logs the exception.
  • 4. Error Types : 1. System Exceptions  Mule invokes a System Exception Strategy when an exception is thrown at the system-level (i.e., when no message is involved, exceptions are handled by system exception strategies). For example, system exception strategies handle exceptions that occur:  During application start-up  When a connection to an external system fails
  • 5. 2. Messaging Exceptions : Mule invokes a Messaging Exception Strategy whenever an exception is thrown within a flow (i.e., whenever a message is involved, exceptions are handled by messaging exception  When a message being processed through a Mule flow throws exception, normal flow execution stops and processes transfers the message processor sequence within the exception strategy. You can incorporate any number of message processors – and in one case, other exception strategies – into an exception strategy to handle the exception precisely as you wish. The diagram illustrates what happens when a message throws an exception.
  • 7. Types of messaging exception strategies :  Default Exception Strategy  Catch exception strategy  Rollback exception strategy  Reference exception strategy  Choice exception strategy
  • 8. Default Exception Strategy : Use :  Defined and implicitly applied by default to handle all messaging exceptions that are thrown in Mule applications Transaction Error Handling :  When a message throws an exception, the default exception strategy rolls back the message and logs the exception.
  • 9. Catch Exception Strategy : Use :  When a message throws an exception, the default exception strategy rolls back the message and logs the exception. Transaction Error Handling :  When a message throws an exception, the catch exception strategyalways commits the transaction and consumes the message.
  • 10. Rollback Exception Strategy : Use :  Define a rollback exception strategy to ensure that a message that throws an exception in a flow is rolled back for reprocessing (if the message source supports redelivery). Rollback exception strategies do not consume inbound messages. Transaction Error Handling :  When a message throws an exception, the rollback exception strategy makes one or more attempts to rollback the message and redeliver it for processing (if the message source supports redelivery). If the message exceeds its redelivery attempts, then the rollback exception strategy commits the failed transaction and consumes the message.
  • 11. Reference Exception Strategy : Use :  Define a reference exception strategy to refer and adhere to the error handling parameters defined in a global catch, rollback or choice exception strategy. Transaction Error Handling :  When a message throws an exception, the reference exception strategy refers and adheres to the error handling parameters defined in a global catch, rollback or choice exception strategy. (The reference exception strategy itself never actually performs any rollback, commit, or consume activities.)
  • 12. Choice Exception Strategy : Use :  Define a choice exception strategy to customize the way Mule handles a message that throws an exception based on the message’s content at the moment it throws the exception. Transaction Error Handling :  When a message throws an exception, the choice exception strategy makes a decision about where to route the message for further processing. (The choice exception strategy itself never actually performs any rollback, commit, or consume activities.)
  • 13. Characteristics of messaging exception strategies:  Each flow can contain only one exception strategy.  Each exception strategy can contain any number of message processors.  Choice exception strategies can contain one or more catch and/or rollback exception strategies. (Rollback and catch exception strategies cannot, however, contain other exception strategies.)