SlideShare a Scribd company logo
1 of 26
1
Introduction
 What is Mule?
 How do you use Mule?
 What are the core Mule concepts?
 Learning mule with File endpoints
2
 Mule is an open-source Enterprise Service
Backbone (ESB)
3
 Folder to folder
 Queue to queue
 Shared memory to shared memory
 Using different types of transports
 In a flexible way
4
 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)
5
 Focus on specifying "What" not "How"
 Empower business analysis to write machine-
readable specifications
 Hide the "How" behind services with clear
interfaces (SOA)
6
 Mule Manager
 Mule Model
 Universal Message Object (UMO)
 Endpoints
 External Applications
7
 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
8
 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.
9
 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
10
 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.
11
 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.
12
 The nine stages of a
mule event
◦ first 2 – inbound
◦ middle 4 – component
◦ last 2 – outbound
13
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Inbound
Component
Outbound
Optional Step
 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
14
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Endpoint
(Message Receiver)
 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
15
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Endpoint
(Message Receiver)
 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.
16
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Service Invocation
Interceptor
Endpoint
(Message Receiver)
Interceptor
 If the inbound data is
not in the correct
format for the service
it must be transformed
at this point
17
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Inbound Transformer
 The actual service is
performed
 In mule, this is generally a
Java object
 Service invocation can also
be a "pass through"
18
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Outbound Transformer
Interceptor
Interceptor
Inbound Transformer
Service Invocation
 Dispatching the data
to all the relevant
endpoints
19
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Transformer
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Outbound Router
 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
20
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Outbound Router
Outbound Transformer
 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)
21
<exception-strategy
className=org.mule.impl.DefaultComponentExceptionStrategy">
<endpoint address="file:///c:/mule-class/error"/>
</exception-strategy>
22
We want all invalid documents to be moved into the
error folder.
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<Element1>Hello World!</Element1>
<Element2>String</Element2>
<Element3>String</Element3>
<DansInvalidDataElement>This is Dans invalid data element</DansInvalidDataElement>
</Data>
23
XML Schema validation will generate an error message
when it gets to the fourth invalid data element:
Given the following XML Schema file:
<outbound-router>
<router className="org.mule.routing.outbound.FilteringXmlMessageSplitter">
<endpoint
address="file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"/>
<properties>
<property name="validateSchema" value="true"/>
<property name="externalSchemaLocation"
value="file:///c:/mule-class/labs/07-validate/my-
schema.xsd"/>
</properties>
</router>
</outbound-router>
24
To validate the XML Schema, just add two properties:
1) tell it to validate the document
2) tell it what file to use and where to find it
 Anypoint Platform is a complete integration platform for SOA, REST,
SaaS integration, and APIs. Anypoint Platform provides a
comprehensive set of tools and services, which includes Anypoint
Studio, Mule ESB, and Anypoint Platform’s online access point.
Anypoint Platform’s access point includes access to Runtime Manager,
API development tools, and more.
 Anypoint Platform helps you achieve your integration goals:
 Integrate SaaS and on-premises applications
 Modernize legacy services
 Orchestrate business processes and services
 Design and publish APIs for end customers, B2B, or mobile - APIs can
be in SOA or REST
 Create API proxies to separate implementation from orchestration
 Engage consumers of your API
 Govern APIs with runtime policies
25
26

More Related Content

What's hot (11)

xslt in mule
xslt in mulexslt in mule
xslt in mule
 
Choice router mule
Choice router   muleChoice router   mule
Choice router mule
 
How to get http query parameters in mule
How to get http query parameters in muleHow to get http query parameters in mule
How to get http query parameters in mule
 
File component in mule
File component in muleFile component in mule
File component in mule
 
Mule agent notifications
Mule agent notificationsMule agent notifications
Mule agent notifications
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb transformers
Mule esb transformersMule esb transformers
Mule esb transformers
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demo
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in Mule
 

Viewers also liked

"Город на віконці"
"Город на віконці""Город на віконці"
"Город на віконці"
Julja Chernenko
 

Viewers also liked (14)

Microcomputadora
MicrocomputadoraMicrocomputadora
Microcomputadora
 
Evaluation q 7
Evaluation q 7Evaluation q 7
Evaluation q 7
 
3 Elements to Setting Goals By: Dustin Hatfield
3 Elements to Setting Goals By: Dustin Hatfield3 Elements to Setting Goals By: Dustin Hatfield
3 Elements to Setting Goals By: Dustin Hatfield
 
Reforma Tributaria ADF
Reforma Tributaria ADFReforma Tributaria ADF
Reforma Tributaria ADF
 
The Rag Doll
The Rag DollThe Rag Doll
The Rag Doll
 
Angeles cobo segundo parcial
Angeles cobo segundo parcialAngeles cobo segundo parcial
Angeles cobo segundo parcial
 
Фестиваль мовних таборів
Фестиваль мовних таборів Фестиваль мовних таборів
Фестиваль мовних таборів
 
2 кл
2 кл2 кл
2 кл
 
Ppt ch06
Ppt ch06Ppt ch06
Ppt ch06
 
Paguina web
Paguina webPaguina web
Paguina web
 
Büyük Anadolu Hastaneleri - Marka Yenileme Sunumu
Büyük Anadolu Hastaneleri - Marka Yenileme SunumuBüyük Anadolu Hastaneleri - Marka Yenileme Sunumu
Büyük Anadolu Hastaneleri - Marka Yenileme Sunumu
 
"Город на віконці"
"Город на віконці""Город на віконці"
"Город на віконці"
 
10 клас
10 клас10 клас
10 клас
 
Drugi rok Zwinnej Łodzi
Drugi rok Zwinnej ŁodziDrugi rok Zwinnej Łodzi
Drugi rok Zwinnej Łodzi
 

Similar to Mule introduction

Similar to Mule introduction (20)

Mule overview
Mule overviewMule overview
Mule overview
 
Mule overview
Mule overviewMule overview
Mule overview
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using Mule
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
Mulesoftppt
Mulesoftppt Mulesoftppt
Mulesoftppt
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule overview
Mule overviewMule overview
Mule overview
 
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 esb usecase
Mule esb usecaseMule esb usecase
Mule esb usecase
 
Mule enterprise service bus
Mule enterprise service busMule enterprise service bus
Mule enterprise service bus
 
Mule overview
Mule overviewMule overview
Mule overview
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss Fuse
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Mule esb and_relevant_components
Mule esb and_relevant_componentsMule esb and_relevant_components
Mule esb and_relevant_components
 
Mule overview
Mule overviewMule overview
Mule overview
 
Elements in a mule flow
Elements in a mule flowElements in a mule flow
Elements in a mule flow
 
Elements in a muleflow
Elements in a muleflowElements in a muleflow
Elements in a muleflow
 
Exchange @ The Core with CTE Solutions
Exchange @ The Core with CTE SolutionsExchange @ The Core with CTE Solutions
Exchange @ The Core with CTE Solutions
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 

Mule introduction

  • 2.  What is Mule?  How do you use Mule?  What are the core Mule concepts?  Learning mule with File endpoints 2
  • 3.  Mule is an open-source Enterprise Service Backbone (ESB) 3
  • 4.  Folder to folder  Queue to queue  Shared memory to shared memory  Using different types of transports  In a flexible way 4
  • 5.  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) 5
  • 6.  Focus on specifying "What" not "How"  Empower business analysis to write machine- readable specifications  Hide the "How" behind services with clear interfaces (SOA) 6
  • 7.  Mule Manager  Mule Model  Universal Message Object (UMO)  Endpoints  External Applications 7
  • 8.  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 8
  • 9.  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. 9
  • 10.  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 10
  • 11.  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. 11
  • 12.  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. 12
  • 13.  The nine stages of a mule event ◦ first 2 – inbound ◦ middle 4 – component ◦ last 2 – outbound 13 Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Inbound Component Outbound Optional Step
  • 14.  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 14 Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Endpoint (Message Receiver)
  • 15.  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 15 Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Endpoint (Message Receiver)
  • 16.  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. 16 Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Service Invocation Interceptor Endpoint (Message Receiver) Interceptor
  • 17.  If the inbound data is not in the correct format for the service it must be transformed at this point 17 Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Outbound Transformer Interceptor Service Invocation Interceptor Inbound Transformer
  • 18.  The actual service is performed  In mule, this is generally a Java object  Service invocation can also be a "pass through" 18 Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Outbound Transformer Interceptor Interceptor Inbound Transformer Service Invocation
  • 19.  Dispatching the data to all the relevant endpoints 19 Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Transformer Interceptor Interceptor Inbound Transformer Service Invocation Outbound Router
  • 20.  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 20 Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Interceptor Interceptor Inbound Transformer Service Invocation Outbound Router Outbound Transformer
  • 21.  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) 21
  • 23. <?xml version="1.0" encoding="UTF-8"?> <Data> <Element1>Hello World!</Element1> <Element2>String</Element2> <Element3>String</Element3> <DansInvalidDataElement>This is Dans invalid data element</DansInvalidDataElement> </Data> 23 XML Schema validation will generate an error message when it gets to the fourth invalid data element: Given the following XML Schema file:
  • 24. <outbound-router> <router className="org.mule.routing.outbound.FilteringXmlMessageSplitter"> <endpoint address="file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"/> <properties> <property name="validateSchema" value="true"/> <property name="externalSchemaLocation" value="file:///c:/mule-class/labs/07-validate/my- schema.xsd"/> </properties> </router> </outbound-router> 24 To validate the XML Schema, just add two properties: 1) tell it to validate the document 2) tell it what file to use and where to find it
  • 25.  Anypoint Platform is a complete integration platform for SOA, REST, SaaS integration, and APIs. Anypoint Platform provides a comprehensive set of tools and services, which includes Anypoint Studio, Mule ESB, and Anypoint Platform’s online access point. Anypoint Platform’s access point includes access to Runtime Manager, API development tools, and more.  Anypoint Platform helps you achieve your integration goals:  Integrate SaaS and on-premises applications  Modernize legacy services  Orchestrate business processes and services  Design and publish APIs for end customers, B2B, or mobile - APIs can be in SOA or REST  Create API proxies to separate implementation from orchestration  Engage consumers of your API  Govern APIs with runtime policies 25
  • 26. 26