SlideShare uma empresa Scribd logo
1 de 14
JBoss Fuse
Error handling
Christina Lin
JBoss Technology Evangelist
clin@redhat.com
RED HAT CONFIDENTIAL | ADD NAME2
Irrecoverable
Recoverable
Error Handling PROBLEM!!!
Unstable network?
Messaging queue full
Incorrect ID data format
Name not found
RED HAT CONFIDENTIAL | ADD NAME3
Error Handling
Recoverable
•  Errors can be reprocessed
•  Problem will go away in time
•  Exception
•  Stores in Exchange
Irrecoverable
•  Errors cannot be reprocessed
•  Problem stays the same
•  Fault Flag
•  Stores in Out Message in Exchange
exchange.getOut().setFault(true);
exchange.getOut().setBody(”err");
RED HAT CONFIDENTIAL | ADD NAME4
Error Handling
Error
Handler
On
Exception
Try
Catch
Finally
<errorHandler id=”errHandler”
type="DefaultErrorHandler”>
</errorHandler>
<onException>
<exception>
java.io.IOException</exception>
<exception>
java.io.SQLException</exception>
<onException>
<doTry>
<process ref="processorFail"/>
<to uri="mock:result"/>
<doCatch>
<exception>java.io.IOException</exception>
<to uri="mock:catch"/>
</doCatch>
<doFinally>
<to uri="mock:finally"/>
</doFinally>
</doTry>
RED HAT CONFIDENTIAL | ADD NAME5
Redelivery
Settings
MaximumRedeliveries
RedeliveryDelay
BackOffMultiplier
CollisionAvoidanceFactor
MaximumRedeliveryDelay
DelayPattern
AsyncDelayedRedelivery
Maximum number
of redelivery
attempts allowed.
Delay between
each redelivery
(ms)
Asynchronous
delayed redelivery
or not?
Exponential
backoff
multiplier used
in each delay
Eg.
1000, 1000x2,
10000x2x2
percentage to use when
calculating a random delay offset
An upper bound for redelivery
delay
Pattern for calculating delay
0:1000;3:500;10;100
RED HAT CONFIDENTIAL | ADD NAME6
Exception Policy
<redeliveryPolicy maximumRedeliveries="5"
retryAttemptedLogLevel="WARN"
backOffMultiplier="2"
useExponentialBackOff="true"/>
Recoverable Errors
<errorHandler id=”errHandler”
type="DefaultErrorHandler”>
<onException>
<exception>
java.io.IOException</exception>
<exception>
java.io.SQLException</exception>
RED HAT CONFIDENTIAL | ADD NAME7
Error Handlers and Scope
Camel Context
Route
Route
Route
Error Handler
On Exception
Error Handler
On Exception
Try n Catch
DefaultError
Handler
LoggingErro
rHandler
NoErrorHan
dler
DeadLetter
Channel
Error Handler
Camel Context Scope
Camel Route Scope
RED HAT CONFIDENTIAL | ADD NAME8
Error Handler
DefaultErrorHandler
Default
one
Log
<errorHandler
id=”errHandler”
type="DefaultErrorHandler”/>
RED HAT CONFIDENTIAL | ADD NAME9
Error Handler
DeadLetterChannel
Log
Dead
Letter
Channel
Queue
Database
Log
File
Option to put
Original Message
<errorHandler
id=”errHandler”
type="DeadLetterChannel”
deadLetterUri=“amq:queue:DLQ"/>
RED HAT CONFIDENTIAL | ADD NAME10
On Exception
Default Error Handler
java.lang.Exception
java.lang.IOException
java.lang.FileNotFoundException
FileNotFoundException
redeliveryDelay = 3000
redeliveryDelay = 5000
Delay = 5000
Retry = 3
MyException
redeliveryDelay = 2000
Delay = 2000
Retry = 3
maximumRedeliveries= 3
Not Handled
RED HAT CONFIDENTIAL | ADD NAME11
Try.. Catch.. Finally
doTry
doCatch
doCatch
doCatch
Process Process
Exception Exception
Exception
Handled = falseException
onWhen
Return exception to
beginning (Caller)
Add more condition
to the exception
condition
onRedeliver
retryWhile
Catch multiple
Exceotion
RED HAT CONFIDENTIAL | ADD NAME12
Try.. Catch.. Finally
<route>
<from uri="direct:start"/>
<doTry>
<process ref="processorFail"/>
<to uri="mock:result"/>
<doCatch>
<exception>java.io.IOException</exception>
<handled><constant>false</constant></handled>
<to uri="mock:io"/>
</doCatch>
<doCatch>
<exception>java.io.IOException</exception>
<onWhen><simple>${exception.message} contains 'Damn'</simple></onWhen>
<to uri="mock:catch"/>
</doCatch>
<doCatch>
<exception>java.lang.Exception</exception>
<to uri="mock:error"/>
</doCatch>
</doTry>
</route>
Just like Java
RED HAT CONFIDENTIAL | ADD NAME13
Error Handler Exercise
Stock
purchase
XML
XML
XSD
Schema
orderdata
Catch the
validate
exception
garbage
Next step
RED HAT CONFIDENTIAL | ADD NAME14
Error Handler Exercise
XML
Random Exceptions
Retry if failed
DLQ
Data

Mais conteúdo relacionado

Destaque

Advantages Over Conventional Error Handling in OOP
Advantages Over Conventional Error Handling in OOPAdvantages Over Conventional Error Handling in OOP
Advantages Over Conventional Error Handling in OOP
Raju Dawadi
 
Exceptions in Java
Exceptions in JavaExceptions in Java
Exceptions in Java
Vadym Lotar
 
Java - Exception Handling
Java - Exception HandlingJava - Exception Handling
Java - Exception Handling
Prabhdeep Singh
 

Destaque (20)

JBoss Fuse Workshop 101 part 4
JBoss Fuse Workshop 101 part 4JBoss Fuse Workshop 101 part 4
JBoss Fuse Workshop 101 part 4
 
JBoss Fuse Workshop 101 part 3
JBoss Fuse Workshop 101 part 3JBoss Fuse Workshop 101 part 3
JBoss Fuse Workshop 101 part 3
 
Jboss Fuse Workshop 101 part 1
Jboss Fuse Workshop 101 part 1Jboss Fuse Workshop 101 part 1
Jboss Fuse Workshop 101 part 1
 
JBoss Fuse Workshop 101 part 5
JBoss Fuse Workshop 101 part 5JBoss Fuse Workshop 101 part 5
JBoss Fuse Workshop 101 part 5
 
JBoss Fuse Workshop 101 part 2
JBoss Fuse Workshop 101 part 2JBoss Fuse Workshop 101 part 2
JBoss Fuse Workshop 101 part 2
 
JBoss Architect Meetup - December 2013 - JBoss Fuse in Vodafone’s Global Inte...
JBoss Architect Meetup - December 2013 - JBoss Fuse in Vodafone’s Global Inte...JBoss Architect Meetup - December 2013 - JBoss Fuse in Vodafone’s Global Inte...
JBoss Architect Meetup - December 2013 - JBoss Fuse in Vodafone’s Global Inte...
 
JBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP containerJBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP container
 
Advantages Over Conventional Error Handling in OOP
Advantages Over Conventional Error Handling in OOPAdvantages Over Conventional Error Handling in OOP
Advantages Over Conventional Error Handling in OOP
 
7 streams and error handling in java
7 streams and error handling in java7 streams and error handling in java
7 streams and error handling in java
 
Addressing Systemic Complexity with SOA and Cloud
Addressing Systemic Complexity with SOA and CloudAddressing Systemic Complexity with SOA and Cloud
Addressing Systemic Complexity with SOA and Cloud
 
Docker and IBM Integration Bus
Docker and IBM Integration BusDocker and IBM Integration Bus
Docker and IBM Integration Bus
 
Exceptions in Java
Exceptions in JavaExceptions in Java
Exceptions in Java
 
Technical Introduction to IBM Integration Bus
Technical Introduction to IBM Integration BusTechnical Introduction to IBM Integration Bus
Technical Introduction to IBM Integration Bus
 
Mail Client from Traveler to Verse On-Premises
Mail Client from Traveler to Verse On-PremisesMail Client from Traveler to Verse On-Premises
Mail Client from Traveler to Verse On-Premises
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss Fuse
 
Riding the Enterprise Integration train
Riding the Enterprise Integration trainRiding the Enterprise Integration train
Riding the Enterprise Integration train
 
Service fabric demo
Service fabric demoService fabric demo
Service fabric demo
 
Java - Exception Handling
Java - Exception HandlingJava - Exception Handling
Java - Exception Handling
 
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
 
Webinar - Mobile Apps: Monolithic to Serverless
Webinar - Mobile Apps: Monolithic to ServerlessWebinar - Mobile Apps: Monolithic to Serverless
Webinar - Mobile Apps: Monolithic to Serverless
 

Semelhante a JBoss Fuse - Fuse workshop Error Handling

JavaScript Proven Practises
JavaScript Proven PractisesJavaScript Proven Practises
JavaScript Proven Practises
Robert MacLean
 
Vejovis: Suggesting Fixes for JavaScript Faults
Vejovis: Suggesting Fixes for JavaScript FaultsVejovis: Suggesting Fixes for JavaScript Faults
Vejovis: Suggesting Fixes for JavaScript Faults
SALT Lab @ UBC
 
Exception handling
Exception handlingException handling
Exception handling
Ravi Sharda
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
Michelangelo van Dam
 
Top5 scalabilityissues withappendix
Top5 scalabilityissues withappendixTop5 scalabilityissues withappendix
Top5 scalabilityissues withappendix
ColdFusionConference
 

Semelhante a JBoss Fuse - Fuse workshop Error Handling (15)

JavaScript Proven Practises
JavaScript Proven PractisesJavaScript Proven Practises
JavaScript Proven Practises
 
Vejovis: Suggesting Fixes for JavaScript Faults
Vejovis: Suggesting Fixes for JavaScript FaultsVejovis: Suggesting Fixes for JavaScript Faults
Vejovis: Suggesting Fixes for JavaScript Faults
 
Building unit tests correctly
Building unit tests correctlyBuilding unit tests correctly
Building unit tests correctly
 
Getting Started With Testing
Getting Started With TestingGetting Started With Testing
Getting Started With Testing
 
Something Died Inside Your Git Repo
Something Died Inside Your Git RepoSomething Died Inside Your Git Repo
Something Died Inside Your Git Repo
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and you
 
Building unit tests correctly with visual studio 2013
Building unit tests correctly with visual studio 2013Building unit tests correctly with visual studio 2013
Building unit tests correctly with visual studio 2013
 
Locking Down Your MySQL Database.pptx
Locking Down Your MySQL Database.pptxLocking Down Your MySQL Database.pptx
Locking Down Your MySQL Database.pptx
 
Java 例外處理壞味道與重構技術
Java 例外處理壞味道與重構技術Java 例外處理壞味道與重構技術
Java 例外處理壞味道與重構技術
 
Clean code & design patterns
Clean code & design patternsClean code & design patterns
Clean code & design patterns
 
Top5 scalabilityissues
Top5 scalabilityissuesTop5 scalabilityissues
Top5 scalabilityissues
 
EWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWDEWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWD
 
Exception handling
Exception handlingException handling
Exception handling
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
 
Top5 scalabilityissues withappendix
Top5 scalabilityissues withappendixTop5 scalabilityissues withappendix
Top5 scalabilityissues withappendix
 

Mais de Christina Lin

Mais de Christina Lin (18)

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Kafka summit apac session
Kafka summit apac sessionKafka summit apac session
Kafka summit apac session
 
Serverless integration anatomy
Serverless integration anatomyServerless integration anatomy
Serverless integration anatomy
 
Day in the life event-driven workshop
Day in the life  event-driven workshopDay in the life  event-driven workshop
Day in the life event-driven workshop
 
Agile integration cloud native developement
Agile integration   cloud native developementAgile integration   cloud native developement
Agile integration cloud native developement
 
Dev conf .in cloud native reference architecture .advance
Dev conf .in cloud native reference architecture .advanceDev conf .in cloud native reference architecture .advance
Dev conf .in cloud native reference architecture .advance
 
Camel k Taiwan Java user group
Camel k  Taiwan Java user groupCamel k  Taiwan Java user group
Camel k Taiwan Java user group
 
Devoxxma-API centric microservices Architecture
Devoxxma-API centric microservices ArchitectureDevoxxma-API centric microservices Architecture
Devoxxma-API centric microservices Architecture
 
Supercharge Your Integration Services
Supercharge Your Integration Services�Supercharge Your Integration Services�
Supercharge Your Integration Services
 
Integrating BPM with Fuse
Integrating BPM with FuseIntegrating BPM with Fuse
Integrating BPM with Fuse
 
Scalable Integration with JBoss Fuse
Scalable Integration with JBoss FuseScalable Integration with JBoss Fuse
Scalable Integration with JBoss Fuse
 
Messaging on the cloud with xPAAS
Messaging on the cloud with xPAASMessaging on the cloud with xPAAS
Messaging on the cloud with xPAAS
 
中間件趨勢 與 Red Hat JBoss
中間件趨勢 與 Red Hat JBoss 中間件趨勢 與 Red Hat JBoss
中間件趨勢 與 Red Hat JBoss
 
Taipei – 加速、整合、自動化
Taipei – 加速、整合、自動化Taipei – 加速、整合、自動化
Taipei – 加速、整合、自動化
 
xPaaS: The JBoss Way
xPaaS: The JBoss WayxPaaS: The JBoss Way
xPaaS: The JBoss Way
 
xPaaS - DevOps
xPaaS - DevOpsxPaaS - DevOps
xPaaS - DevOps
 
HP Event, Openshift and Devops from Developer side
HP Event, Openshift and Devops from Developer sideHP Event, Openshift and Devops from Developer side
HP Event, Openshift and Devops from Developer side
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

JBoss Fuse - Fuse workshop Error Handling

  • 1. JBoss Fuse Error handling Christina Lin JBoss Technology Evangelist clin@redhat.com
  • 2. RED HAT CONFIDENTIAL | ADD NAME2 Irrecoverable Recoverable Error Handling PROBLEM!!! Unstable network? Messaging queue full Incorrect ID data format Name not found
  • 3. RED HAT CONFIDENTIAL | ADD NAME3 Error Handling Recoverable •  Errors can be reprocessed •  Problem will go away in time •  Exception •  Stores in Exchange Irrecoverable •  Errors cannot be reprocessed •  Problem stays the same •  Fault Flag •  Stores in Out Message in Exchange exchange.getOut().setFault(true); exchange.getOut().setBody(”err");
  • 4. RED HAT CONFIDENTIAL | ADD NAME4 Error Handling Error Handler On Exception Try Catch Finally <errorHandler id=”errHandler” type="DefaultErrorHandler”> </errorHandler> <onException> <exception> java.io.IOException</exception> <exception> java.io.SQLException</exception> <onException> <doTry> <process ref="processorFail"/> <to uri="mock:result"/> <doCatch> <exception>java.io.IOException</exception> <to uri="mock:catch"/> </doCatch> <doFinally> <to uri="mock:finally"/> </doFinally> </doTry>
  • 5. RED HAT CONFIDENTIAL | ADD NAME5 Redelivery Settings MaximumRedeliveries RedeliveryDelay BackOffMultiplier CollisionAvoidanceFactor MaximumRedeliveryDelay DelayPattern AsyncDelayedRedelivery Maximum number of redelivery attempts allowed. Delay between each redelivery (ms) Asynchronous delayed redelivery or not? Exponential backoff multiplier used in each delay Eg. 1000, 1000x2, 10000x2x2 percentage to use when calculating a random delay offset An upper bound for redelivery delay Pattern for calculating delay 0:1000;3:500;10;100
  • 6. RED HAT CONFIDENTIAL | ADD NAME6 Exception Policy <redeliveryPolicy maximumRedeliveries="5" retryAttemptedLogLevel="WARN" backOffMultiplier="2" useExponentialBackOff="true"/> Recoverable Errors <errorHandler id=”errHandler” type="DefaultErrorHandler”> <onException> <exception> java.io.IOException</exception> <exception> java.io.SQLException</exception>
  • 7. RED HAT CONFIDENTIAL | ADD NAME7 Error Handlers and Scope Camel Context Route Route Route Error Handler On Exception Error Handler On Exception Try n Catch DefaultError Handler LoggingErro rHandler NoErrorHan dler DeadLetter Channel Error Handler Camel Context Scope Camel Route Scope
  • 8. RED HAT CONFIDENTIAL | ADD NAME8 Error Handler DefaultErrorHandler Default one Log <errorHandler id=”errHandler” type="DefaultErrorHandler”/>
  • 9. RED HAT CONFIDENTIAL | ADD NAME9 Error Handler DeadLetterChannel Log Dead Letter Channel Queue Database Log File Option to put Original Message <errorHandler id=”errHandler” type="DeadLetterChannel” deadLetterUri=“amq:queue:DLQ"/>
  • 10. RED HAT CONFIDENTIAL | ADD NAME10 On Exception Default Error Handler java.lang.Exception java.lang.IOException java.lang.FileNotFoundException FileNotFoundException redeliveryDelay = 3000 redeliveryDelay = 5000 Delay = 5000 Retry = 3 MyException redeliveryDelay = 2000 Delay = 2000 Retry = 3 maximumRedeliveries= 3 Not Handled
  • 11. RED HAT CONFIDENTIAL | ADD NAME11 Try.. Catch.. Finally doTry doCatch doCatch doCatch Process Process Exception Exception Exception Handled = falseException onWhen Return exception to beginning (Caller) Add more condition to the exception condition onRedeliver retryWhile Catch multiple Exceotion
  • 12. RED HAT CONFIDENTIAL | ADD NAME12 Try.. Catch.. Finally <route> <from uri="direct:start"/> <doTry> <process ref="processorFail"/> <to uri="mock:result"/> <doCatch> <exception>java.io.IOException</exception> <handled><constant>false</constant></handled> <to uri="mock:io"/> </doCatch> <doCatch> <exception>java.io.IOException</exception> <onWhen><simple>${exception.message} contains 'Damn'</simple></onWhen> <to uri="mock:catch"/> </doCatch> <doCatch> <exception>java.lang.Exception</exception> <to uri="mock:error"/> </doCatch> </doTry> </route> Just like Java
  • 13. RED HAT CONFIDENTIAL | ADD NAME13 Error Handler Exercise Stock purchase XML XML XSD Schema orderdata Catch the validate exception garbage Next step
  • 14. RED HAT CONFIDENTIAL | ADD NAME14 Error Handler Exercise XML Random Exceptions Retry if failed DLQ Data