SlideShare a Scribd company logo
1 of 26
Download to read offline
© Bits In Glass. All rights reserved.
Mule 4 Error Handling and Logging
Edmonton Meetup
Thu, Oct 29, 1:00 PM (MDT)
© Bits In Glass. All rights reserved.
Agenda
1. Introduction and House keeping - Jimmy
2. Introduce the Scenario
3. Error Handling Basics
4. Advanced Error Handling Topics
5. Avoiding Error
6. Redelivery Policy and Reconnection Strategies
7. Error Summary and Questions
8. Logging
9. Logging Summary and Quests
10. Announce Winners
© Bits In Glass. All rights reserved.
Quiz and Swag
•At 3 Points in the presentation there will be a quiz
•Quiz will be on the material just covered
•Post answers in the chat
•First correct answer will win a prize
•Winners will be announced at the end
© Bits In Glass. All rights reserved.
The Presenter : Eric Carsted
•Director of Technology and Principal Architect of the Integration
Practice at Bits In Glass(BiG)
•Leads the BiG architecture team and responsible for QA of BiG’s
projects.
•36 years in the industry with 25 years in an architecture role at
companies such as Sun Microsystems (Chief Enterprise Architect),
IBM (Industry Architect Oil and Gas)
•Chief IT Architect for two construction projects; a refinery and SAGD
Oilsands facility.
•Chief Architect for Enterprise Integration for major airline enabling
the Passenger Reservation and Departure Control Systems migration.
•Extensive experience in Cloud and On-premise Data Centers,
Enterprise Infrastructure, and complex integration with Camel, IBM
WebSphere ESB, Mulesoft, TIBCO, Informatica, IOT, SCADA, and
OSIsoft PI.
© Bits In Glass. All rights reserved.
Goals of this Meetup
•Demystify Mule 4 Error Handling
•Expose Scenarios for Error Handling that you can implement today
•Liberate you with tips to avoid Errors
•Investigate Redelivery Policy and Reconnection Strategies
•Verify your work with negative testing
•Empower your logging so you can trouble shoot faster
•Recommend a payload logging solution
•Yeet some goodies
•Main GOAL : Improve your Mule 4 DELIVERY and bring some joy to
2020.
© Bits In Glass. All rights reserved.
Error Handling in context of a Scenario
© Bits In Glass. All rights reserved.
Error Handling Complexity Based on Pattern
© Bits In Glass. All rights reserved.
Error Handling Basics
•Error categories (System Errors, Messaging Errors)
•Error Data Type
• Tip : set vars.reasonPhrase to error.description
• Tip : set vars.statusCode based on error.Type
Field Description Selector Expression
Description A description of the problem. #[error.description]
Detailed
Description
A description of the problem, which can be the same or more
extensive than the description.
#[error.detailedDescription]
Type
A type, used to characterize the problem and allow for routing
within an error handler.
#[error.errorType]
Cause The underlying Java Throwable that resulted in the failure. #[error.cause]
Message An optional Mule message about the problem. #[error.errorMessage]
Child Errors
An optional collection of inner errors, used by elements like
Scatter-Gather to provide aggregated route errors.
#[error.childErrors]
© Bits In Glass. All rights reserved.
Error Types (Hierarchies)
•Mule errors have a namespace (such as HTTP: and FILE:) and
identifier (such as NOT_FOUND), and they belong to a hierarchy of
error types.
© Bits In Glass. All rights reserved.
Examples of Namespace and Identifiers Based
on Context of the Scope
Default HTTP JMS
© Bits In Glass. All rights reserved.
Basics 2 - Which Error Handler will be used
Default Error Handling
By default, unhandled messaging errors are logged and propagated. When a flow is processing a
Mule message that raises an error, the normal execution of the flow stops, and the process
transfers to the flow’s default error handler, which propagates the error.
On-Error Component (Propagate, Continue) and flow behavior
▪ Continue: Execute On-Error Scope ->Terminate Current Scope -> Return Success to Parent Scope
▪ Propagate: Execute On-Error Scope -> Terminate Current Scope -> Return Error to Parent Scope.
* Terminate Parent Scope
Global Error Handlers
A global error handler can be useful if you want more than one flow or Try
scope to handle errors in the same way. You can create reuse configurations by
providing a reference to an error handler flow
•Time to show some examples in Studio
© Bits In Glass. All rights reserved.
Additional Error Topics
Error Mapping
In each operation of your flow, you can map the possible error types to a
custom error type of your choosing. You can use these custom error types
to differentiate where an error occurred in your flow.
Raise Error Component
This core component generates a Mule error, as if a failure had occurred,
which allows you to customize its description and type. Use this
component to only raise:
• Core runtime errors, such as MULE:SECURITY, MULE:CONNECTIVITY, etc.
• Custom error types.
• You cannot raise an error from another connector or module like
FILE:FILE_NOT_FOUND, JSON:INVALID_SCHEMA. You cannot use a connector’s
existing namespace.
© Bits In Glass. All rights reserved.
Additional Error Topics - Continued
Additional differences between Continue and Propagate
•Your payload is not available in On-Continue
•You cannot set a payload within On-Continue
•Payload in On-Propagate is the state of the payload prior to executing
the connector
Other Notes
•If you need to access information in the payload after On-Continue,
store it in a variable
•There is nowhere to access the statusCode returned by a connector. You
need to determine your statusCode yourself based on error.errorType
•Subflows do not have an error Scope
© Bits In Glass. All rights reserved.
Reconnection Strategies
Default connection behavior
• When an operation in a Mule application fails to connect to an external server,
the default behavior is for the operation to fail immediately and return a
connectivity error.
Override the Default behavior
• You can configure a reconnection strategy for an operation either by modifying
the operation properties or by modifying the configuration of the global
element for the operation.
Reconnection Strategies
• None: Is the default behavior, which immediately returns a connectivity error if
the attempt to connect is unsuccessful
• Standard: (reconnect) Sets the number of reconnection attempts and the
interval at which to execute them before returning a connectivity error
• Forever: (reconnect-forever) Attempts to reconnect continually at a given
interval
© Bits In Glass. All rights reserved.
Redelivery Policy
Redelivery Policy
• A redelivery policy is a filter that helps you conserve resources by limiting the number
of times the Mule runtime engine (Mule) executes messages that generate errors.
Redelivery Policy Behavior
• When you add a redelivery policy to a flow’s source, Mule evaluates the received data
before it executes the flow’s components. If a message delivery fails a specified
number of times, the redelivery policy prevents the flow from processing the received
data.
How the Redelivery Policy Works
• Each time the source receives a new message, Mule identifies the message by
generating its key.
• If the processing flow causes an exception, Mule increments the counter associated
with the message key. When the counter reaches a value greater than the configured
maxRedeliveryCount value, Mule throws a MULE:REDELIVERY_EXHAUSTED error.
• If the processing flow does not cause an exception, its counter is reset.
© Bits In Glass. All rights reserved.
Avoiding Errors
Validation
• Passing clean data to your components will greatly reduce the number of errors you
encounter at run time. (Sure thing Captain Obvious!)
Inbound Data Validation: Use RAML Validation in your API SPECS
• Field: Type, Required, Enumerated Values, Assign Default Values to missing fields
• For Strings: Pattern, Min and Max Length
• For Numbers: Min and Max Value, Format
• For Arrays: Unique Items, Min and Max Items
• For Files: File Type, Min and Max Length
• Tip: Route file and db xfers through an HTTP Endpoint with API Spec to validate data
Outbound Data Validation
• Not Provided by Mulesoft
• Bits in Glass has built an Outbound Data Validator that uses API Spec that we use
during Development to improve code quality. We turn it off in higher environments
© Bits In Glass. All rights reserved.
Avoiding Errors - Continued
Idempotent Message Validator
The Idempotent Message Validator ensures that only unique messages continue through a
flow’s execution by checking the unique ID of the incoming message. Use incoming attribute
of the Mule message as an ID, or compute the ID by configuring a DataWeave expression.
Use the DataWeave Crypto functions to compute hashes (SHA, MD5) from the data. Throws
MULE:DUPLICATE_MESSAGE
Avoid Code Errors by Testing
• Negative Testing – Exercise all error handling if possible, build dummy endpoints
that throw every error type.
• MUnits
• Test Recorder in Studio to Create Munits
• End to End Testing
• Consistency between Environments (From Dev to Prod)
• Unit Testing with Postman, SOAPUI, etc
• Regression test suite
© Bits In Glass. All rights reserved.
Error Summary and Questions
Final Thoughts on Error Handling
•Handling Errors takes time and thought – Budget ~30% of the total
development effort for it, more if you must handle business errors.
•Handle errors for every major interaction with component and systems.
Let the default error handler take care of the rest, you probably can’t do
much about it anyway.
•Validate your data and test your handling routines
•Use reasonable Reconnection and Redelivery Policies
Questions?
© Bits In Glass. All rights reserved.
Logging
Why Log?
What is my system doing? How can I figure out what went wrong and what were the
conditions at the time of the error? What information do I need while developing and
testing? What do I need in Production? Logging has been, and still is the #1 go to
solution.
Mule Logging
Every app that you build in Studio comes with its own log4j2.xml file. The log contains
information about any errors raised in the app (unless you have app logic to handle those
errors). It also contains anything you want to explicitly log, if you build the logic in the app.
Logger Component
A Core component helps you monitor and debug your Mule application by logging
important information such as error messages, status notifications, payloads, and so on.
You can add a Logger anywhere in a flow, and you can configure it to log a string that you
specify, the output of a DataWeave expression you write, or any combination of strings
and expressions.
© Bits In Glass. All rights reserved.
Guidance on Logging
Where should you log in flows
▪ Start and end of every Flow
▪ Start and end of large piece of logic
▪ Before and after transformations (optional)
▪ Before and after interaction with an external system
▪ On Error
What to Log – Subjective but
▪ Mule application and system info and info about external systems being called.
▪ Inbound transaction ID
▪ End to end flow correlation ID
▪ External system Transaction ID
▪ Lapse Time at end or after the above mentioned locations
▪ Key data you may need to tract down root cause in outside systems.
Use Log Levels and Categories
© Bits In Glass. All rights reserved.
JSON Logger Module
Author : Andres Ramirez
What is it?
A generic JSON Logger module which is considered a drop-in replacement of the existing Logger
component.
How to Use it?
Customize the output JSON log by defining a matching JSON Schema. Once satisfied with the JSON
schema, all of the module’s code can be dynamically re-generated by building and packaging the
module. The outcome will be a new JSON logger module that developers can install in Anypoint Studio
and leverage from the palette like any other component.
Learn More!
https://blogs.mulesoft.com/dev/mule-dev/logging-in-mule-using-json-logger-module/
https://blogs.mulesoft.com/dev/anypoint-platform-dev/json-logging-mule-4/
© Bits In Glass. All rights reserved.
Example JSON Logs
© Bits In Glass. All rights reserved.
Notifications
•Notifications, although not directly part of error handling or
logging, it is part of the overall error event management.
•May only want to Notify on certain errors
•Execute Notifications from the On-Error Scope
•Make sure you don’t become a Spammer by sending too many
notification to the point your email server gets block
•Getting the lists of interested parties is the hardest part
© Bits In Glass. All rights reserved.
Payload Logging
Problem Statement
• Sometimes you need the entire message to End-to-End trouble shoot
messages and Mulesoft doesn’t provide a mechanism to persist message data.
• Mule logs are not the Answer
• Truncation of large messages
• No guaranty log messages will be persisted at high volume
• Size of the logs reduces log retention
• Data privacy
Bits in Glass Offering
• A payload logging solution that used JMS to asynchronously move messages to
a data store of choice. Provides meta data, clear text, encrypted, or a
combination of both.
• Contact BiG Sales for more information.
© Bits In Glass. All rights reserved.
Logging Summary and Questions
•Logging is necessary
•Modern tooling (JSON Logging) can make the job easier and
provide more information and better results
•Notify those in the need to know know with notifications
•If payload logging is required, there are options but nothing out of
the box
Questions?
© Bits In Glass. All rights reserved.
Who is Bits In Glass?
When you need it done right get the experts in MuleSoft
✔ Trusted enterprise implementation services
✔ Centre for enablement consulting
✔ Expert architecture consulting that accelerates development
✔ Augmented in-house development for program scalability
✔ Ongoing Anypoint application maintenance and support

More Related Content

What's hot

DataWeave and Error Handling Meetup at SF Tower Sept 24th
DataWeave and Error Handling Meetup at SF Tower Sept 24thDataWeave and Error Handling Meetup at SF Tower Sept 24th
DataWeave and Error Handling Meetup at SF Tower Sept 24thJordan Schuetz
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CDPatryk Bandurski
 
Surat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime FabricSurat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime FabricJitendra Bafna
 
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLBMuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLBJitendra Bafna
 
Warsaw mulesoft meetup #9 mastering integration with salesforce
Warsaw mulesoft meetup #9 mastering integration with salesforceWarsaw mulesoft meetup #9 mastering integration with salesforce
Warsaw mulesoft meetup #9 mastering integration with salesforcePatryk Bandurski
 
MuleSoft Integration with AWS Cognito Client Credentials and Mule JWT Validat...
MuleSoft Integration with AWS Cognito Client Credentials and Mule JWT Validat...MuleSoft Integration with AWS Cognito Client Credentials and Mule JWT Validat...
MuleSoft Integration with AWS Cognito Client Credentials and Mule JWT Validat...Manish Kumar Yadav
 
MuleSoft Clustring, Okta, CI/CD Integration with Jenkins
MuleSoft Clustring, Okta, CI/CD Integration with JenkinsMuleSoft Clustring, Okta, CI/CD Integration with Jenkins
MuleSoft Clustring, Okta, CI/CD Integration with JenkinsManish Kumar Yadav
 
MuleSoft meetup_sg_no2_may19
MuleSoft meetup_sg_no2_may19MuleSoft meetup_sg_no2_may19
MuleSoft meetup_sg_no2_may19Julian Douch
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...Jitendra Bafna
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangaloreD.Rajesh Kumar
 
Hyderabad MuleSoft Meetup - Anypoint Studio Tips and Tricks & Salesforce Comp...
Hyderabad MuleSoft Meetup - Anypoint Studio Tips and Tricks & Salesforce Comp...Hyderabad MuleSoft Meetup - Anypoint Studio Tips and Tricks & Salesforce Comp...
Hyderabad MuleSoft Meetup - Anypoint Studio Tips and Tricks & Salesforce Comp...Sravan Lingam
 
Mumbai MuleSoft Meetup:Batch Processing, Anypoint Messaging Queue and Custom ...
Mumbai MuleSoft Meetup:Batch Processing, Anypoint Messaging Queue and Custom ...Mumbai MuleSoft Meetup:Batch Processing, Anypoint Messaging Queue and Custom ...
Mumbai MuleSoft Meetup:Batch Processing, Anypoint Messaging Queue and Custom ...Manish Kumar Yadav
 
MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019Ieva Navickaite
 
MuleSoft Surat Live Demonstration Virtual Meetup#2 - Customer Hosted Mule Run...
MuleSoft Surat Live Demonstration Virtual Meetup#2 - Customer Hosted Mule Run...MuleSoft Surat Live Demonstration Virtual Meetup#2 - Customer Hosted Mule Run...
MuleSoft Surat Live Demonstration Virtual Meetup#2 - Customer Hosted Mule Run...Jitendra Bafna
 
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...Jitendra Bafna
 
MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...
MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...
MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...Jitendra Bafna
 
Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4Tejas Purohit
 
Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.Harish Kumar
 
Mulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingMulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingManish Kumar Yadav
 
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Manish Kumar Yadav
 

What's hot (20)

DataWeave and Error Handling Meetup at SF Tower Sept 24th
DataWeave and Error Handling Meetup at SF Tower Sept 24thDataWeave and Error Handling Meetup at SF Tower Sept 24th
DataWeave and Error Handling Meetup at SF Tower Sept 24th
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CD
 
Surat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime FabricSurat MuleSoft Meetup#2 - Anypoint Runtime Fabric
Surat MuleSoft Meetup#2 - Anypoint Runtime Fabric
 
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLBMuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
 
Warsaw mulesoft meetup #9 mastering integration with salesforce
Warsaw mulesoft meetup #9 mastering integration with salesforceWarsaw mulesoft meetup #9 mastering integration with salesforce
Warsaw mulesoft meetup #9 mastering integration with salesforce
 
MuleSoft Integration with AWS Cognito Client Credentials and Mule JWT Validat...
MuleSoft Integration with AWS Cognito Client Credentials and Mule JWT Validat...MuleSoft Integration with AWS Cognito Client Credentials and Mule JWT Validat...
MuleSoft Integration with AWS Cognito Client Credentials and Mule JWT Validat...
 
MuleSoft Clustring, Okta, CI/CD Integration with Jenkins
MuleSoft Clustring, Okta, CI/CD Integration with JenkinsMuleSoft Clustring, Okta, CI/CD Integration with Jenkins
MuleSoft Clustring, Okta, CI/CD Integration with Jenkins
 
MuleSoft meetup_sg_no2_may19
MuleSoft meetup_sg_no2_may19MuleSoft meetup_sg_no2_may19
MuleSoft meetup_sg_no2_may19
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangalore
 
Hyderabad MuleSoft Meetup - Anypoint Studio Tips and Tricks & Salesforce Comp...
Hyderabad MuleSoft Meetup - Anypoint Studio Tips and Tricks & Salesforce Comp...Hyderabad MuleSoft Meetup - Anypoint Studio Tips and Tricks & Salesforce Comp...
Hyderabad MuleSoft Meetup - Anypoint Studio Tips and Tricks & Salesforce Comp...
 
Mumbai MuleSoft Meetup:Batch Processing, Anypoint Messaging Queue and Custom ...
Mumbai MuleSoft Meetup:Batch Processing, Anypoint Messaging Queue and Custom ...Mumbai MuleSoft Meetup:Batch Processing, Anypoint Messaging Queue and Custom ...
Mumbai MuleSoft Meetup:Batch Processing, Anypoint Messaging Queue and Custom ...
 
MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019
 
MuleSoft Surat Live Demonstration Virtual Meetup#2 - Customer Hosted Mule Run...
MuleSoft Surat Live Demonstration Virtual Meetup#2 - Customer Hosted Mule Run...MuleSoft Surat Live Demonstration Virtual Meetup#2 - Customer Hosted Mule Run...
MuleSoft Surat Live Demonstration Virtual Meetup#2 - Customer Hosted Mule Run...
 
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
 
MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...
MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...
MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...
 
Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4Ahmedabad MuleSoft Meetup #4
Ahmedabad MuleSoft Meetup #4
 
Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.
 
Mulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handlingMulesoft meetup slides mumbai_20113019_exception_handling
Mulesoft meetup slides mumbai_20113019_exception_handling
 
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
 

Similar to Virtual Meetup: Mule 4 Error Handling and Logging

Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsAhmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsShekh Muenuddeen
 
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsAhmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsShekh Muenuddeen
 
MuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_CharlotteMuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_CharlotteSubhash Patel
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing SoftwareSteven Smith
 
[DSC Europe 22] Engineers guide for shepherding models in to production - Mar...
[DSC Europe 22] Engineers guide for shepherding models in to production - Mar...[DSC Europe 22] Engineers guide for shepherding models in to production - Mar...
[DSC Europe 22] Engineers guide for shepherding models in to production - Mar...DataScienceConferenc1
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...AgileNetwork
 
Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing SoftwareSteven Smith
 
Curiosity software Ireland and Perfecto present: achieving in-sprint regressi...
Curiosity software Ireland and Perfecto present: achieving in-sprint regressi...Curiosity software Ireland and Perfecto present: achieving in-sprint regressi...
Curiosity software Ireland and Perfecto present: achieving in-sprint regressi...Curiosity Software Ireland
 
Model-Based Testing for ALM Octane: Better tests, built faster
Model-Based Testing for ALM Octane: Better tests, built faster Model-Based Testing for ALM Octane: Better tests, built faster
Model-Based Testing for ALM Octane: Better tests, built faster Curiosity Software Ireland
 
Load testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerLoad testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerAndrew Siemer
 
Best Practices for Magento Debugging
Best Practices for Magento Debugging Best Practices for Magento Debugging
Best Practices for Magento Debugging varien
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing SoftwareSteven Smith
 
Integration strategies best practices- Mulesoft meetup April 2018
Integration strategies   best practices- Mulesoft meetup April 2018Integration strategies   best practices- Mulesoft meetup April 2018
Integration strategies best practices- Mulesoft meetup April 2018Rohan Rasane
 
Cypress Best Pratices for Test Automation
Cypress Best Pratices for Test AutomationCypress Best Pratices for Test Automation
Cypress Best Pratices for Test AutomationKnoldus Inc.
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing SoftwareSteven Smith
 
Small is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case DesignSmall is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case DesignGeorgina Tilby
 
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
Exception handling in Mule 4 �_Virtual mule soft meetup may_2020Exception handling in Mule 4 �_Virtual mule soft meetup may_2020
Exception handling in Mule 4 _Virtual mule soft meetup may_2020Om Prakash
 
Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Om Prakash
 

Similar to Virtual Meetup: Mule 4 Error Handling and Logging (20)

Grails Services
Grails ServicesGrails Services
Grails Services
 
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsAhmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
 
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalertsAhmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
 
Neil Potter Presentation
Neil Potter Presentation Neil Potter Presentation
Neil Potter Presentation
 
MuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_CharlotteMuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_Charlotte
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing Software
 
[DSC Europe 22] Engineers guide for shepherding models in to production - Mar...
[DSC Europe 22] Engineers guide for shepherding models in to production - Mar...[DSC Europe 22] Engineers guide for shepherding models in to production - Mar...
[DSC Europe 22] Engineers guide for shepherding models in to production - Mar...
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
 
Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing Software
 
Curiosity software Ireland and Perfecto present: achieving in-sprint regressi...
Curiosity software Ireland and Perfecto present: achieving in-sprint regressi...Curiosity software Ireland and Perfecto present: achieving in-sprint regressi...
Curiosity software Ireland and Perfecto present: achieving in-sprint regressi...
 
Model-Based Testing for ALM Octane: Better tests, built faster
Model-Based Testing for ALM Octane: Better tests, built faster Model-Based Testing for ALM Octane: Better tests, built faster
Model-Based Testing for ALM Octane: Better tests, built faster
 
Load testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew SiemerLoad testing with Visual Studio and Azure - Andrew Siemer
Load testing with Visual Studio and Azure - Andrew Siemer
 
Best Practices for Magento Debugging
Best Practices for Magento Debugging Best Practices for Magento Debugging
Best Practices for Magento Debugging
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Integration strategies best practices- Mulesoft meetup April 2018
Integration strategies   best practices- Mulesoft meetup April 2018Integration strategies   best practices- Mulesoft meetup April 2018
Integration strategies best practices- Mulesoft meetup April 2018
 
Cypress Best Pratices for Test Automation
Cypress Best Pratices for Test AutomationCypress Best Pratices for Test Automation
Cypress Best Pratices for Test Automation
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Small is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case DesignSmall is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case Design
 
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
Exception handling in Mule 4 �_Virtual mule soft meetup may_2020Exception handling in Mule 4 �_Virtual mule soft meetup may_2020
Exception handling in Mule 4 _Virtual mule soft meetup may_2020
 
Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020Virtual MuleSoft Meetup may_2020
Virtual MuleSoft Meetup may_2020
 

More from Jimmy Attia

Composer Overview Meetup.pdf
Composer Overview Meetup.pdfComposer Overview Meetup.pdf
Composer Overview Meetup.pdfJimmy Attia
 
Microservices & anypoint service mesh calgary mule soft meetup
Microservices & anypoint service mesh   calgary mule soft meetupMicroservices & anypoint service mesh   calgary mule soft meetup
Microservices & anypoint service mesh calgary mule soft meetupJimmy Attia
 
Addressing performance issues with API monitoring
Addressing performance issues with API monitoringAddressing performance issues with API monitoring
Addressing performance issues with API monitoringJimmy Attia
 
Virtual Meetup - MuleSoft Catalyst and Accelerator for Banking
Virtual Meetup - MuleSoft Catalyst and Accelerator for BankingVirtual Meetup - MuleSoft Catalyst and Accelerator for Banking
Virtual Meetup - MuleSoft Catalyst and Accelerator for BankingJimmy Attia
 
Virtual Meetup - API Security Best Practices
Virtual Meetup - API Security Best PracticesVirtual Meetup - API Security Best Practices
Virtual Meetup - API Security Best PracticesJimmy Attia
 
Virtual meetup - Exploring the Runtime Fabric deployment model
Virtual meetup - Exploring the Runtime Fabric deployment modelVirtual meetup - Exploring the Runtime Fabric deployment model
Virtual meetup - Exploring the Runtime Fabric deployment modelJimmy Attia
 
Testing strategies and best practices using MUnit
Testing strategies and best practices using MUnitTesting strategies and best practices using MUnit
Testing strategies and best practices using MUnitJimmy Attia
 

More from Jimmy Attia (7)

Composer Overview Meetup.pdf
Composer Overview Meetup.pdfComposer Overview Meetup.pdf
Composer Overview Meetup.pdf
 
Microservices & anypoint service mesh calgary mule soft meetup
Microservices & anypoint service mesh   calgary mule soft meetupMicroservices & anypoint service mesh   calgary mule soft meetup
Microservices & anypoint service mesh calgary mule soft meetup
 
Addressing performance issues with API monitoring
Addressing performance issues with API monitoringAddressing performance issues with API monitoring
Addressing performance issues with API monitoring
 
Virtual Meetup - MuleSoft Catalyst and Accelerator for Banking
Virtual Meetup - MuleSoft Catalyst and Accelerator for BankingVirtual Meetup - MuleSoft Catalyst and Accelerator for Banking
Virtual Meetup - MuleSoft Catalyst and Accelerator for Banking
 
Virtual Meetup - API Security Best Practices
Virtual Meetup - API Security Best PracticesVirtual Meetup - API Security Best Practices
Virtual Meetup - API Security Best Practices
 
Virtual meetup - Exploring the Runtime Fabric deployment model
Virtual meetup - Exploring the Runtime Fabric deployment modelVirtual meetup - Exploring the Runtime Fabric deployment model
Virtual meetup - Exploring the Runtime Fabric deployment model
 
Testing strategies and best practices using MUnit
Testing strategies and best practices using MUnitTesting strategies and best practices using MUnit
Testing strategies and best practices using MUnit
 

Recently uploaded

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

Virtual Meetup: Mule 4 Error Handling and Logging

  • 1. © Bits In Glass. All rights reserved. Mule 4 Error Handling and Logging Edmonton Meetup Thu, Oct 29, 1:00 PM (MDT)
  • 2. © Bits In Glass. All rights reserved. Agenda 1. Introduction and House keeping - Jimmy 2. Introduce the Scenario 3. Error Handling Basics 4. Advanced Error Handling Topics 5. Avoiding Error 6. Redelivery Policy and Reconnection Strategies 7. Error Summary and Questions 8. Logging 9. Logging Summary and Quests 10. Announce Winners
  • 3. © Bits In Glass. All rights reserved. Quiz and Swag •At 3 Points in the presentation there will be a quiz •Quiz will be on the material just covered •Post answers in the chat •First correct answer will win a prize •Winners will be announced at the end
  • 4. © Bits In Glass. All rights reserved. The Presenter : Eric Carsted •Director of Technology and Principal Architect of the Integration Practice at Bits In Glass(BiG) •Leads the BiG architecture team and responsible for QA of BiG’s projects. •36 years in the industry with 25 years in an architecture role at companies such as Sun Microsystems (Chief Enterprise Architect), IBM (Industry Architect Oil and Gas) •Chief IT Architect for two construction projects; a refinery and SAGD Oilsands facility. •Chief Architect for Enterprise Integration for major airline enabling the Passenger Reservation and Departure Control Systems migration. •Extensive experience in Cloud and On-premise Data Centers, Enterprise Infrastructure, and complex integration with Camel, IBM WebSphere ESB, Mulesoft, TIBCO, Informatica, IOT, SCADA, and OSIsoft PI.
  • 5. © Bits In Glass. All rights reserved. Goals of this Meetup •Demystify Mule 4 Error Handling •Expose Scenarios for Error Handling that you can implement today •Liberate you with tips to avoid Errors •Investigate Redelivery Policy and Reconnection Strategies •Verify your work with negative testing •Empower your logging so you can trouble shoot faster •Recommend a payload logging solution •Yeet some goodies •Main GOAL : Improve your Mule 4 DELIVERY and bring some joy to 2020.
  • 6. © Bits In Glass. All rights reserved. Error Handling in context of a Scenario
  • 7. © Bits In Glass. All rights reserved. Error Handling Complexity Based on Pattern
  • 8. © Bits In Glass. All rights reserved. Error Handling Basics •Error categories (System Errors, Messaging Errors) •Error Data Type • Tip : set vars.reasonPhrase to error.description • Tip : set vars.statusCode based on error.Type Field Description Selector Expression Description A description of the problem. #[error.description] Detailed Description A description of the problem, which can be the same or more extensive than the description. #[error.detailedDescription] Type A type, used to characterize the problem and allow for routing within an error handler. #[error.errorType] Cause The underlying Java Throwable that resulted in the failure. #[error.cause] Message An optional Mule message about the problem. #[error.errorMessage] Child Errors An optional collection of inner errors, used by elements like Scatter-Gather to provide aggregated route errors. #[error.childErrors]
  • 9. © Bits In Glass. All rights reserved. Error Types (Hierarchies) •Mule errors have a namespace (such as HTTP: and FILE:) and identifier (such as NOT_FOUND), and they belong to a hierarchy of error types.
  • 10. © Bits In Glass. All rights reserved. Examples of Namespace and Identifiers Based on Context of the Scope Default HTTP JMS
  • 11. © Bits In Glass. All rights reserved. Basics 2 - Which Error Handler will be used Default Error Handling By default, unhandled messaging errors are logged and propagated. When a flow is processing a Mule message that raises an error, the normal execution of the flow stops, and the process transfers to the flow’s default error handler, which propagates the error. On-Error Component (Propagate, Continue) and flow behavior ▪ Continue: Execute On-Error Scope ->Terminate Current Scope -> Return Success to Parent Scope ▪ Propagate: Execute On-Error Scope -> Terminate Current Scope -> Return Error to Parent Scope. * Terminate Parent Scope Global Error Handlers A global error handler can be useful if you want more than one flow or Try scope to handle errors in the same way. You can create reuse configurations by providing a reference to an error handler flow •Time to show some examples in Studio
  • 12. © Bits In Glass. All rights reserved. Additional Error Topics Error Mapping In each operation of your flow, you can map the possible error types to a custom error type of your choosing. You can use these custom error types to differentiate where an error occurred in your flow. Raise Error Component This core component generates a Mule error, as if a failure had occurred, which allows you to customize its description and type. Use this component to only raise: • Core runtime errors, such as MULE:SECURITY, MULE:CONNECTIVITY, etc. • Custom error types. • You cannot raise an error from another connector or module like FILE:FILE_NOT_FOUND, JSON:INVALID_SCHEMA. You cannot use a connector’s existing namespace.
  • 13. © Bits In Glass. All rights reserved. Additional Error Topics - Continued Additional differences between Continue and Propagate •Your payload is not available in On-Continue •You cannot set a payload within On-Continue •Payload in On-Propagate is the state of the payload prior to executing the connector Other Notes •If you need to access information in the payload after On-Continue, store it in a variable •There is nowhere to access the statusCode returned by a connector. You need to determine your statusCode yourself based on error.errorType •Subflows do not have an error Scope
  • 14. © Bits In Glass. All rights reserved. Reconnection Strategies Default connection behavior • When an operation in a Mule application fails to connect to an external server, the default behavior is for the operation to fail immediately and return a connectivity error. Override the Default behavior • You can configure a reconnection strategy for an operation either by modifying the operation properties or by modifying the configuration of the global element for the operation. Reconnection Strategies • None: Is the default behavior, which immediately returns a connectivity error if the attempt to connect is unsuccessful • Standard: (reconnect) Sets the number of reconnection attempts and the interval at which to execute them before returning a connectivity error • Forever: (reconnect-forever) Attempts to reconnect continually at a given interval
  • 15. © Bits In Glass. All rights reserved. Redelivery Policy Redelivery Policy • A redelivery policy is a filter that helps you conserve resources by limiting the number of times the Mule runtime engine (Mule) executes messages that generate errors. Redelivery Policy Behavior • When you add a redelivery policy to a flow’s source, Mule evaluates the received data before it executes the flow’s components. If a message delivery fails a specified number of times, the redelivery policy prevents the flow from processing the received data. How the Redelivery Policy Works • Each time the source receives a new message, Mule identifies the message by generating its key. • If the processing flow causes an exception, Mule increments the counter associated with the message key. When the counter reaches a value greater than the configured maxRedeliveryCount value, Mule throws a MULE:REDELIVERY_EXHAUSTED error. • If the processing flow does not cause an exception, its counter is reset.
  • 16. © Bits In Glass. All rights reserved. Avoiding Errors Validation • Passing clean data to your components will greatly reduce the number of errors you encounter at run time. (Sure thing Captain Obvious!) Inbound Data Validation: Use RAML Validation in your API SPECS • Field: Type, Required, Enumerated Values, Assign Default Values to missing fields • For Strings: Pattern, Min and Max Length • For Numbers: Min and Max Value, Format • For Arrays: Unique Items, Min and Max Items • For Files: File Type, Min and Max Length • Tip: Route file and db xfers through an HTTP Endpoint with API Spec to validate data Outbound Data Validation • Not Provided by Mulesoft • Bits in Glass has built an Outbound Data Validator that uses API Spec that we use during Development to improve code quality. We turn it off in higher environments
  • 17. © Bits In Glass. All rights reserved. Avoiding Errors - Continued Idempotent Message Validator The Idempotent Message Validator ensures that only unique messages continue through a flow’s execution by checking the unique ID of the incoming message. Use incoming attribute of the Mule message as an ID, or compute the ID by configuring a DataWeave expression. Use the DataWeave Crypto functions to compute hashes (SHA, MD5) from the data. Throws MULE:DUPLICATE_MESSAGE Avoid Code Errors by Testing • Negative Testing – Exercise all error handling if possible, build dummy endpoints that throw every error type. • MUnits • Test Recorder in Studio to Create Munits • End to End Testing • Consistency between Environments (From Dev to Prod) • Unit Testing with Postman, SOAPUI, etc • Regression test suite
  • 18. © Bits In Glass. All rights reserved. Error Summary and Questions Final Thoughts on Error Handling •Handling Errors takes time and thought – Budget ~30% of the total development effort for it, more if you must handle business errors. •Handle errors for every major interaction with component and systems. Let the default error handler take care of the rest, you probably can’t do much about it anyway. •Validate your data and test your handling routines •Use reasonable Reconnection and Redelivery Policies Questions?
  • 19. © Bits In Glass. All rights reserved. Logging Why Log? What is my system doing? How can I figure out what went wrong and what were the conditions at the time of the error? What information do I need while developing and testing? What do I need in Production? Logging has been, and still is the #1 go to solution. Mule Logging Every app that you build in Studio comes with its own log4j2.xml file. The log contains information about any errors raised in the app (unless you have app logic to handle those errors). It also contains anything you want to explicitly log, if you build the logic in the app. Logger Component A Core component helps you monitor and debug your Mule application by logging important information such as error messages, status notifications, payloads, and so on. You can add a Logger anywhere in a flow, and you can configure it to log a string that you specify, the output of a DataWeave expression you write, or any combination of strings and expressions.
  • 20. © Bits In Glass. All rights reserved. Guidance on Logging Where should you log in flows ▪ Start and end of every Flow ▪ Start and end of large piece of logic ▪ Before and after transformations (optional) ▪ Before and after interaction with an external system ▪ On Error What to Log – Subjective but ▪ Mule application and system info and info about external systems being called. ▪ Inbound transaction ID ▪ End to end flow correlation ID ▪ External system Transaction ID ▪ Lapse Time at end or after the above mentioned locations ▪ Key data you may need to tract down root cause in outside systems. Use Log Levels and Categories
  • 21. © Bits In Glass. All rights reserved. JSON Logger Module Author : Andres Ramirez What is it? A generic JSON Logger module which is considered a drop-in replacement of the existing Logger component. How to Use it? Customize the output JSON log by defining a matching JSON Schema. Once satisfied with the JSON schema, all of the module’s code can be dynamically re-generated by building and packaging the module. The outcome will be a new JSON logger module that developers can install in Anypoint Studio and leverage from the palette like any other component. Learn More! https://blogs.mulesoft.com/dev/mule-dev/logging-in-mule-using-json-logger-module/ https://blogs.mulesoft.com/dev/anypoint-platform-dev/json-logging-mule-4/
  • 22. © Bits In Glass. All rights reserved. Example JSON Logs
  • 23. © Bits In Glass. All rights reserved. Notifications •Notifications, although not directly part of error handling or logging, it is part of the overall error event management. •May only want to Notify on certain errors •Execute Notifications from the On-Error Scope •Make sure you don’t become a Spammer by sending too many notification to the point your email server gets block •Getting the lists of interested parties is the hardest part
  • 24. © Bits In Glass. All rights reserved. Payload Logging Problem Statement • Sometimes you need the entire message to End-to-End trouble shoot messages and Mulesoft doesn’t provide a mechanism to persist message data. • Mule logs are not the Answer • Truncation of large messages • No guaranty log messages will be persisted at high volume • Size of the logs reduces log retention • Data privacy Bits in Glass Offering • A payload logging solution that used JMS to asynchronously move messages to a data store of choice. Provides meta data, clear text, encrypted, or a combination of both. • Contact BiG Sales for more information.
  • 25. © Bits In Glass. All rights reserved. Logging Summary and Questions •Logging is necessary •Modern tooling (JSON Logging) can make the job easier and provide more information and better results •Notify those in the need to know know with notifications •If payload logging is required, there are options but nothing out of the box Questions?
  • 26. © Bits In Glass. All rights reserved. Who is Bits In Glass? When you need it done right get the experts in MuleSoft ✔ Trusted enterprise implementation services ✔ Centre for enablement consulting ✔ Expert architecture consulting that accelerates development ✔ Augmented in-house development for program scalability ✔ Ongoing Anypoint application maintenance and support