Mule error handling

12
Mule ESB Error Handling - Karthik Selvaraj

Transcript of Mule error handling

Page 1: Mule error handling

Mule ESB Error

Handling- Karthik Selvaraj

Page 2: Mule error handling

“ 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

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

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

Messaging Exception Strategy

A Mule flow without any messaging exception strategy

Page 6: Mule error handling

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

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

Messaging Exception Strategy

Exception Handling Flow

Mule Console

Page 9: Mule error handling

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

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

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 ?