SlideShare a Scribd company logo
The Enterprise Service Bus
Introduction using Mule
Agenda
 What is Mule?
 How do you use Mule?
 What are the core Mule concepts?
 Learning mule with File endpoints
Enterprise Service Backbone
 Mule is an open-source Enterprise Service Backbone (ESB)
Mule’s “Moves Things
Around”
 Folder to folder
 Queue to queue
 Shared memory to shared memory
 Using different types of transports
 In a flexible way
XML Pipeline
 An XML pipeline is a series of operation that are
performed on one or more XML files
 Examples include:
 validate
 transform
 prune (remove nodes)
 split (break a single XML file into many files)
 merge (join two or more files together)
Declarative Approach
 Focus on specifying "What" not "How"
 Empower business analysis to write machine-readable
specifications
 Hide the "How" behind services with clear interfaces
(SOA)
Core Mule Concepts
 Mule Manager
 Mule Model
 Universal Message Object (UMO)
 Endpoints
 External Applications
Transport
 A transport or "provider", is a set of objects that add
support to Mule to handle a specific kind of transport or
protocol
 Examples
 the "Email Provider" enables Mule to send and receive
messages via the SMTP, POP and IMAP protocols
Connector
 A connector is the object that sends and receives
messages on behalf of an endpoint.
 Connectors are bundled as part of specific transports or
providers.
 For example, the FileConnector can read and write
file system files.
Router
 A router is the object that do something with messages
once they have been received by a connector, or prior
to being sent out by the connector
Filter
 A filter optionally filters incoming or
outgoing messages that are coming
into or going out from a connector.
 For example, the File Provider comes
with a FilenameWildcardFilter
that restricts which files are read by
the connector based on file name
patterns. For example only files with
the .xml extension can be routed.
 Filters are used in conjunction with
Routers.
Transformer
 A transformer optionally changes incoming or outgoing
messages in some way
 This is usually done to make the message format
useable by a downstream function
 Examples:
 the ByteArrayToString transformer converts byte arrays
into String objects.
Mule Event Flow
 The nine stages of a mule event
 first 2 – inbound
 middle 4 – component
 last 2 – outbound
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Inbound
Component
Outbound
Optional Step
Message Receiver Endpoint
 Some event triggers a message flow
 A file being written into a folder
 A message arriving on a message queue
 A record in a database
 Data written to a socket
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Endpoint
(Message Receiver)
Inbound Router
 The inbound router is the fist step
in a message. Functions typically
performed by an inbound router
 Filtering
 Remove duplicate messages
 Matching messages
 Aggregation (combining)
 Re-sequence data
 Forwarding
 See also
 IdempotentReceiver
 CorrolationAggregator
 CorrelationResequencer
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Endpoint
(Message Receiver)
Interceptor
 Used to intercept message
flow into your service
component
 Used trigger monitor/events
or interrupt the flow of the
message
 Example: an authorization
interceptor could ensure that
the current request has the
correct credentials to invoke
the service.
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Service Invocation
Interceptor
Endpoint
(Message Receiver)
Interceptor
Inbound Transformer
 If the inbound data is not in the
correct format for the service it
must be transformed at this point
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Inbound Transformer
Service Invocation
 The actual service is performed
 In mule, this is generally a Java object
 Service invocation can also be a "pass
through"
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Outbound Transformer
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Outbound Router
 Dispatching the data to all the
relevant endpoints
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Transformer
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Outbound Router
Built-in Router Classes
Inbound Outbound Response
Idempotent Receiver Filtering Outbound Router Response Aggregator
Selective Consumer Recipient List
Aggregator Multicasting Router
Resequencer Chaining Router
Forwarding Consumer Message Splitter
Filtering List Message
Splitter
Filtering Xml Message
Splitter
Exception Based Router
Outbound Transformer
 Any transformations that needs
to be done on the message after
a service has been performed on
the message can be executed
before it is put into the endpoint
 See Also
 EnvelopeInterceptor
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Outbound Router
Outbound Transformer
Only Moving XML Files
<inbound-router>
<endpoint address="file:///c:/mule-class/in">
<filter pattern="*.xml"
className=
"org.mule.providers.file.filters.FilenameWildcardFilter"/>
</endpoint>
</inbound-router>
Add the filter line to only move files with the extension
"*.xml". If you add a file "foobar.txt to the input folder it
will not be moved.
Keeping the Name The Same
<outbound-router>
<router className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint
address=
"file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"
/>
</router>
</outbound-router>
Add the outputPattern parameter to keep the output
name the same as the input.
Exception Handling
 Mule has a special way of handling non-happy path processing.
This is called an "Exception Strategy" but is it really just and
exception path and there is very little strategy involved.
 There are three places you can associate an exception strategy
 connector
 component
 model (set for all components in a model)
Exception Strategy
<exception-strategy
className=org.mule.impl.DefaultComponentExceptionStrategy">
<endpoint address="file:///c:/mule-class/error"/>
</exception-strategy>
We want all invalid documents to be moved into the
error folder.
Error Message
document : cvc-complex-type.2.4.d: Invalid content was found
starting with element 'DansInvalidDataElement'. No child
element is expected at this point.
This error message is generated on the Mule console
when an invalid data element is found. But what should
we do with it? How do we redirect it to the appropriate
user?
Thank youThank you

More Related Content

What's hot

Lecture14Slides.ppt
Lecture14Slides.pptLecture14Slides.ppt
Lecture14Slides.ppt
Videoguy
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
Kavitha713564
 
Servlet basics
Servlet basicsServlet basics
Servlet basics
Santosh Dhoundiyal
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS Transport
Rupesh Sinha
 
Adhoc (1)
Adhoc (1)Adhoc (1)
Adhoc (1)
Muthukrishnan008
 
Python modules
Python modulesPython modules
Java
JavaJava
Io streams
Io streamsIo streams
Mule enricher
Mule enricher Mule enricher
Mule enricher
Ravinder Singh
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
AbDul ThaYyal
 
Input File dalam C++
Input File dalam C++Input File dalam C++
Input File dalam C++
Teguh Nugraha
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
Karnam Karthik
 
Input output files in java
Input output files in javaInput output files in java
Input output files in java
Kavitha713564
 
Chapter 12 - File Input and Output
Chapter 12 - File Input and OutputChapter 12 - File Input and Output
Chapter 12 - File Input and Output
Eduardo Bergavera
 
Mule esb
Mule esbMule esb
Mule esb
charan teja R
 
Handling I/O in Java
Handling I/O in JavaHandling I/O in Java
Handling I/O in Java
Hiranya Jayathilaka
 
Java I/O
Java I/OJava I/O
Mule overview
Mule overviewMule overview
Mule overview
Praneethchampion
 
Java IO
Java IOJava IO
Java IO
UTSAB NEUPANE
 
Java nio ( new io )
Java nio ( new io )Java nio ( new io )
Java nio ( new io )
Jemin Patel
 

What's hot (20)

Lecture14Slides.ppt
Lecture14Slides.pptLecture14Slides.ppt
Lecture14Slides.ppt
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
 
Servlet basics
Servlet basicsServlet basics
Servlet basics
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS Transport
 
Adhoc (1)
Adhoc (1)Adhoc (1)
Adhoc (1)
 
Python modules
Python modulesPython modules
Python modules
 
Java
JavaJava
Java
 
Io streams
Io streamsIo streams
Io streams
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Input File dalam C++
Input File dalam C++Input File dalam C++
Input File dalam C++
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
 
Input output files in java
Input output files in javaInput output files in java
Input output files in java
 
Chapter 12 - File Input and Output
Chapter 12 - File Input and OutputChapter 12 - File Input and Output
Chapter 12 - File Input and Output
 
Mule esb
Mule esbMule esb
Mule esb
 
Handling I/O in Java
Handling I/O in JavaHandling I/O in Java
Handling I/O in Java
 
Java I/O
Java I/OJava I/O
Java I/O
 
Mule overview
Mule overviewMule overview
Mule overview
 
Java IO
Java IOJava IO
Java IO
 
Java nio ( new io )
Java nio ( new io )Java nio ( new io )
Java nio ( new io )
 

Similar to Mule overview

Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
AbdulImrankhan7
 
Mulesoftppt
Mulesoftppt Mulesoftppt
Mule introduction
Mule introductionMule introduction
Mule introduction
Satya Sekhar Das Mandal
 
Mule overview
Mule overviewMule overview
Mule overview
Rajkattamuri
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using Mule
Khasim Cise
 
Mule esb usecase
Mule esb usecaseMule esb usecase
Mule esb usecase
charan teja R
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
VirtusaPolaris
 
Mule Overview
Mule OverviewMule Overview
Mule Overview
AbdulImrankhan7
 
Mule overview
Mule overviewMule overview
Mule overview
Mohammed625
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
mdfkhan625
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
Khadhar Koneti
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
Achyuta Lakshmi
 
Mule esb
Mule esbMule esb
Mule esb
vishnukanthro45
 
Mule enterprise service bus
Mule enterprise service busMule enterprise service bus
Mule enterprise service bus
Thang Loi
 
Mule overview
Mule overviewMule overview
Mule overview
nikitjain2011
 
Biz TalkMessaging Overview
Biz TalkMessaging OverviewBiz TalkMessaging Overview
Biz TalkMessaging Overview
rajeshgaddam
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in mule
Sindhu VL
 
Mule working with components
Mule   working with componentsMule   working with components
Mule working with components
kiranvanga
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
Sindhu VL
 
Concepts in mule
Concepts in muleConcepts in mule
Concepts in mule
Sindhu VL
 

Similar to Mule overview (20)

Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
Mulesoftppt
Mulesoftppt Mulesoftppt
Mulesoftppt
 
Mule introduction
Mule introductionMule introduction
Mule introduction
 
Mule overview
Mule overviewMule overview
Mule overview
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using Mule
 
Mule esb usecase
Mule esb usecaseMule esb usecase
Mule esb usecase
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
 
Mule Overview
Mule OverviewMule Overview
Mule Overview
 
Mule overview
Mule overviewMule overview
Mule overview
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule enterprise service bus
Mule enterprise service busMule enterprise service bus
Mule enterprise service bus
 
Mule overview
Mule overviewMule overview
Mule overview
 
Biz TalkMessaging Overview
Biz TalkMessaging OverviewBiz TalkMessaging Overview
Biz TalkMessaging Overview
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in mule
 
Mule working with components
Mule   working with componentsMule   working with components
Mule working with components
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
 
Concepts in mule
Concepts in muleConcepts in mule
Concepts in mule
 

Recently uploaded

Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
Fwdays
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 

Recently uploaded (20)

Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 

Mule overview

  • 1. The Enterprise Service Bus Introduction using Mule
  • 2. Agenda  What is Mule?  How do you use Mule?  What are the core Mule concepts?  Learning mule with File endpoints
  • 3. Enterprise Service Backbone  Mule is an open-source Enterprise Service Backbone (ESB)
  • 4. Mule’s “Moves Things Around”  Folder to folder  Queue to queue  Shared memory to shared memory  Using different types of transports  In a flexible way
  • 5. XML Pipeline  An XML pipeline is a series of operation that are performed on one or more XML files  Examples include:  validate  transform  prune (remove nodes)  split (break a single XML file into many files)  merge (join two or more files together)
  • 6. Declarative Approach  Focus on specifying "What" not "How"  Empower business analysis to write machine-readable specifications  Hide the "How" behind services with clear interfaces (SOA)
  • 7. Core Mule Concepts  Mule Manager  Mule Model  Universal Message Object (UMO)  Endpoints  External Applications
  • 8. Transport  A transport or "provider", is a set of objects that add support to Mule to handle a specific kind of transport or protocol  Examples  the "Email Provider" enables Mule to send and receive messages via the SMTP, POP and IMAP protocols
  • 9. Connector  A connector is the object that sends and receives messages on behalf of an endpoint.  Connectors are bundled as part of specific transports or providers.  For example, the FileConnector can read and write file system files.
  • 10. Router  A router is the object that do something with messages once they have been received by a connector, or prior to being sent out by the connector
  • 11. Filter  A filter optionally filters incoming or outgoing messages that are coming into or going out from a connector.  For example, the File Provider comes with a FilenameWildcardFilter that restricts which files are read by the connector based on file name patterns. For example only files with the .xml extension can be routed.  Filters are used in conjunction with Routers.
  • 12. Transformer  A transformer optionally changes incoming or outgoing messages in some way  This is usually done to make the message format useable by a downstream function  Examples:  the ByteArrayToString transformer converts byte arrays into String objects.
  • 13. Mule Event Flow  The nine stages of a mule event  first 2 – inbound  middle 4 – component  last 2 – outbound Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Inbound Component Outbound Optional Step
  • 14. Message Receiver Endpoint  Some event triggers a message flow  A file being written into a folder  A message arriving on a message queue  A record in a database  Data written to a socket Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Endpoint (Message Receiver)
  • 15. Inbound Router  The inbound router is the fist step in a message. Functions typically performed by an inbound router  Filtering  Remove duplicate messages  Matching messages  Aggregation (combining)  Re-sequence data  Forwarding  See also  IdempotentReceiver  CorrolationAggregator  CorrelationResequencer Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Endpoint (Message Receiver)
  • 16. Interceptor  Used to intercept message flow into your service component  Used trigger monitor/events or interrupt the flow of the message  Example: an authorization interceptor could ensure that the current request has the correct credentials to invoke the service. Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Service Invocation Interceptor Endpoint (Message Receiver) Interceptor
  • 17. Inbound Transformer  If the inbound data is not in the correct format for the service it must be transformed at this point Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Outbound Transformer Interceptor Service Invocation Interceptor Inbound Transformer
  • 18. Service Invocation  The actual service is performed  In mule, this is generally a Java object  Service invocation can also be a "pass through" Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Outbound Transformer Interceptor Interceptor Inbound Transformer Service Invocation
  • 19. Outbound Router  Dispatching the data to all the relevant endpoints Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Transformer Interceptor Interceptor Inbound Transformer Service Invocation Outbound Router
  • 20. Built-in Router Classes Inbound Outbound Response Idempotent Receiver Filtering Outbound Router Response Aggregator Selective Consumer Recipient List Aggregator Multicasting Router Resequencer Chaining Router Forwarding Consumer Message Splitter Filtering List Message Splitter Filtering Xml Message Splitter Exception Based Router
  • 21. Outbound Transformer  Any transformations that needs to be done on the message after a service has been performed on the message can be executed before it is put into the endpoint  See Also  EnvelopeInterceptor Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Interceptor Interceptor Inbound Transformer Service Invocation Outbound Router Outbound Transformer
  • 22. Only Moving XML Files <inbound-router> <endpoint address="file:///c:/mule-class/in"> <filter pattern="*.xml" className= "org.mule.providers.file.filters.FilenameWildcardFilter"/> </endpoint> </inbound-router> Add the filter line to only move files with the extension "*.xml". If you add a file "foobar.txt to the input folder it will not be moved.
  • 23. Keeping the Name The Same <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRouter"> <endpoint address= "file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]" /> </router> </outbound-router> Add the outputPattern parameter to keep the output name the same as the input.
  • 24. Exception Handling  Mule has a special way of handling non-happy path processing. This is called an "Exception Strategy" but is it really just and exception path and there is very little strategy involved.  There are three places you can associate an exception strategy  connector  component  model (set for all components in a model)
  • 26. Error Message document : cvc-complex-type.2.4.d: Invalid content was found starting with element 'DansInvalidDataElement'. No child element is expected at this point. This error message is generated on the Mule console when an invalid data element is found. But what should we do with it? How do we redirect it to the appropriate user?