SlideShare a Scribd company logo
MULE ESB
MULE ESB DEMO.
MULE
REQUIRED S/W
MULE BUILDING BLOCKS
SET UP IDE/SW
DEMO EXAMPLES
AGENDA
› What is Mule ESB?
Enterprise Service Bus (ESB)
Easily perform integration of existing systems, Regardless of
technology.
Service creation and hosting — expose and host reusable services.
Service mediation- service mediator aids communication between
system-level service consumers and service providers
Message routing - route, filter, aggregate, and re-sequence messages
based on content and rules.
 Data transformation — exchange data across varying formats and
transport protocols
MULE ESB RECAP
Building blocks
› Components: are flexible tools which perform business logic
implemented in Java and other scripting languages for e.g java
component, javascript, groovy, echo, logger.
› Filters: only allow certain messages to continue to be processed in a
flow for e.g .
› Routers: control message flow to route, resequence, or split and
aggregate messages in a flow for e.g All flow, Choice flow.
› Scopes wrap other messages processors so as to enable them to
perform together as a group. for e.g Async, Message Enricher, foreach.
› Transformers convert message payload type and data format to
facilitate communication between systems converters. Object to
String,Body to Parameter Map.
Message Processors
› To make decisions about routing, filtering, and other common tasks.
The logic of these decisions often relies on evaluating expressions.
› Mule Expression Language (MEL) is the primary language used for
formulating such expressions throughout Mule ESB.
SIGNIFICANCE MEL
› The message header, which contains metadata about the message
› The message payload, which contains your business-specific data.
MULE MESSAGE
#[message.header.get()] This expression calls the "get" method
and performs it on the object,
#[message.payload[4]] the expression returns the value of the
5th item in the list.
#[message.payload['type'].equals('XM
L')]
Check if param type is equals to XML
#[message.id] This expression accesses a particular
attribute associated with the specified
context object.
#[message.payload] Returns payload.
#[2 + 2 == 4] This expression uses an operator to
perform a comparison. It evaluates to
true.
MULE EXPRESSION
LANGUAGE
› EndPoints
› Ajax: this allows mule events to be asynchronously
received to and from web.
› File: Allows mule application to read and write into local file
system.
› Http: Allow mule events to be connected with http protocol.
› Jms: Allow mule events to read and send message to
queue with JMS API.
Components
› Commonly Used Component
› Use a Logger component to log activities in the flow as they occur.
› Use an Expression component to evaluate a particular expression upon a
message in a flow.
› Use an Echo component to return the payload of a message as a call
response.
› Use a Flow Ref component to access another flow from within a flow.
Component cont.
› Mule message filters are message processors that follow the enterprise
integration pattern called Message Filter.
Message Filters
› A filter that discards incoming HTTP requests
› ………
<flow name="filteredFlow2">
<http:inbound-endpoint host="localhost" port="8000" path="orders"/>
<expression-filter
expression="message.inboundProperties['Authorization'] != null"/>
<component class="org.my.OrderProcessingComponent" />
</flow>…..
Message filters cont.
› A choice router is a message processor that decides where
to send a message based on their contents.
› A choice exception strategy is a way of deciding which way
to route a message that must deviate from the normal
processing path. Choice exception strategies use MEL
expressions.
Choice routers
Choice routers cont.
› <flow name="downloadsSorterFlow">
› <file:inbound-endpoint path="/home/me/downloads" />
› <choice>
› <when expression="#[message.inboundProperties['filename'].endsWith('.jpg']">
› <file:outbound-endpoint path="/home/me/photos" />
› </when>
› <when expression="#[message.inboundProperties['filename'].endsWith('.doc')]">
› <file:outbound-endpoint path="#[/home/me/docs" />
› </when>
› <otherwise>
› <file:outbound-endpoint path="/home/me/misc"/>
› </otherwise>
› </choice>
› </flow>
XML CONFIGURATION
› Mule invokes a Messaging Exception Strategy whenever an exception
is thrown within a flow.
Exception STRATEGY
› An expression transformer is a message processor that executes
expressions on the current message. The results of the expressions
replace the payload.
› This transformer transforms the message by appending “Received !” to
the message payload.
› <expression-transformer expression="#[message.payload +
'Received!']"/>
Expression
transformers
› A logger is a message processor that logs message via Mules logging
sub-system.
› The message to be logged is configured as an attribute of the logger.
This message attribute supports tokens (placeholders). The tokens can
contain MEL expressions.
<logger
message="File Received (size =
#[message.inboundProperties['fileSize']/1024] kb)"
level="INFO"
/>
Loggers
› Extract the downloaded MuleStudio binary into a folder
› Go to bin folder Run MuleStudio.exe
› To create new project file->mule project
SETUP IDE
Project structure
• CONTENT BASED ROUTING
• JMS EXAMPLE
• STRATEGIC EXCEPTION
DEMO
› Flow
Choice example
• Import a project into a mule studio choice example.
• Right click on the project –start as mule project
• Watch the logs whether project is deployed successfully.
• Execute following url to get XML response
• http://localhost:1001/?name=Muley&amount=20000&term=48&ssn=12
34&type=XML
• Execute following url to get different response
• http://localhost:1001/?name=Muley&amount=20000&term=48&ssn=12
34&type=othervalue
How to run
JMS Example
› Start Apache mq
› Import jmsexample into mule studio, deploy the project.
› Open http://localhost:8161/admin/queues.jsp . click on send tab,
Message gui will appear, select queue as queue1 and set body content
either 1001 or 1002 or 1003 for valid content or other value to set error
messages .
› Watch console logs, payload for each flow will appear.
› Success message will enqueue in customerqueue
› Error message will enqueue in errorqueue
Steps to run
CATCH EXCEPTION
› Start Apache mq
› Import catchexception strategy into mule studio, deploy the
project by running project as mule application.
› Open http://localhost:8161/admin/queues.jsp . click on
send tab, Message gui will appear, select queue as queue1
and set body content either ERROR OR TEST OR
othervalue
› Watch console logs, payload for each flow will appear.
Steps to run
› MEL
http://www.mulesoft.org/documentation/display/current/Introduction+to+
Expressions+in+Mule
› Cheat Sheat
ttp://www.mulesoft.org/documentation/display/current/MEL+Cheat+Sheet
› Transformers
http://www.mulesoft.org/documentation/display/current/Transformers
ESB References

More Related Content

PPTX
Mule advanced
PPTX
Mule soa
PPTX
Mulesoft idempotent Message Filter
PPTX
Message properties component in mule
PPTX
Mule Message Properties Component
PPTX
Scatter gather flow in mule
PPTX
Mule soa
PPTX
Mulesoft file connector
Mule advanced
Mule soa
Mulesoft idempotent Message Filter
Message properties component in mule
Mule Message Properties Component
Scatter gather flow in mule
Mule soa
Mulesoft file connector

What's hot (20)

PPTX
Core concepts in mule
PPTX
Mule esb transformers
PPTX
Scatter gatherinmule
 
PPTX
Mule rabbit mq
PPTX
Mule agent notifications
PPTX
Mule ESB - Mock Salesforce Interface
PPTX
Mule Microsoft Service Bus
PPTX
Mule dataweave
PPTX
xslt in mule
PPTX
Send email attachment using smtp in mule esb
PPTX
Database component in mule
PPTX
Muleflowarchitecturepart2
PPTX
Rabbit Mq in Mule
PPTX
Mule esb
PPTX
Mule rabbitmq
PPT
Mule overview-ppt
PPTX
Vm component in mule
PPTX
File component in mule demo
PPTX
Mule concepts connectors
PPTX
Mule LDAP Connector
Core concepts in mule
Mule esb transformers
Scatter gatherinmule
 
Mule rabbit mq
Mule agent notifications
Mule ESB - Mock Salesforce Interface
Mule Microsoft Service Bus
Mule dataweave
xslt in mule
Send email attachment using smtp in mule esb
Database component in mule
Muleflowarchitecturepart2
Rabbit Mq in Mule
Mule esb
Mule rabbitmq
Mule overview-ppt
Vm component in mule
File component in mule demo
Mule concepts connectors
Mule LDAP Connector
Ad

Viewers also liked (16)

PPTX
Rest web services
PPTX
Junit in mule
PPT
Implementing an ESB using Mule
PDF
Customer acquisition proposal box accounting
PPT
Mule security
PPT
Mule security - spring security manager
PPTX
Mule Expression language
PPTX
Mule expression language
PPTX
Mule securing
PPTX
Mule Security
PPTX
Securing mule
PPTX
Query in share point by mule
PPTX
Expression language in mule
PPTX
Rest security in mule
PPTX
Best Practices for API Security
PDF
Mule ESB Fundamentals
Rest web services
Junit in mule
Implementing an ESB using Mule
Customer acquisition proposal box accounting
Mule security
Mule security - spring security manager
Mule Expression language
Mule expression language
Mule securing
Mule Security
Securing mule
Query in share point by mule
Expression language in mule
Rest security in mule
Best Practices for API Security
Mule ESB Fundamentals
Ad

Similar to Mule esb (20)

PDF
Mule esb and_relevant_components
PPTX
Mule slides
PPTX
PPTX
Sai mule esb batch
PPTX
Mule esb
PPTX
Mule enterprise service introduction
PPTX
Mule esb
PPTX
Mule esb kranthi
PPTX
Esb process
PPTX
Mule esb kranthi
PPT
Mule esb presentation 2015
PPTX
PPTX
Ashok mule esb
PPT
Introduction to mule Esbs
PPTX
Niranjan mule esb
PPTX
Mule esb naveen
PPT
Introduction to esbs mule
PPT
Introduction to es bs mule
PPTX
Mule fundamentals muthu guru rathinesh g
PPT
Introduction to mule esb's
 
Mule esb and_relevant_components
Mule slides
Sai mule esb batch
Mule esb
Mule enterprise service introduction
Mule esb
Mule esb kranthi
Esb process
Mule esb kranthi
Mule esb presentation 2015
Ashok mule esb
Introduction to mule Esbs
Niranjan mule esb
Mule esb naveen
Introduction to esbs mule
Introduction to es bs mule
Mule fundamentals muthu guru rathinesh g
Introduction to mule esb's
 

More from sathyaraj Anand (6)

PPTX
Mule message processor or routers
PPT
Mule cloudhubconsoleoverview-sathyaraj
PPT
Security authorizationusingspringsecurity-sathyaraj
PPT
Security springsecuritymanager-sathyaraj
PPTX
Mule esb mule message
PPTX
Mule filters
Mule message processor or routers
Mule cloudhubconsoleoverview-sathyaraj
Security authorizationusingspringsecurity-sathyaraj
Security springsecuritymanager-sathyaraj
Mule esb mule message
Mule filters

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
KodekX | Application Modernization Development
PDF
Empathic Computing: Creating Shared Understanding
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
NewMind AI Weekly Chronicles - August'25 Week I
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Understanding_Digital_Forensics_Presentation.pptx
The AUB Centre for AI in Media Proposal.docx
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
Dropbox Q2 2025 Financial Results & Investor Presentation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Per capita expenditure prediction using model stacking based on satellite ima...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
KodekX | Application Modernization Development
Empathic Computing: Creating Shared Understanding

Mule esb

  • 2. MULE REQUIRED S/W MULE BUILDING BLOCKS SET UP IDE/SW DEMO EXAMPLES AGENDA
  • 3. › What is Mule ESB? Enterprise Service Bus (ESB) Easily perform integration of existing systems, Regardless of technology. Service creation and hosting — expose and host reusable services. Service mediation- service mediator aids communication between system-level service consumers and service providers Message routing - route, filter, aggregate, and re-sequence messages based on content and rules.  Data transformation — exchange data across varying formats and transport protocols MULE ESB RECAP
  • 5. › Components: are flexible tools which perform business logic implemented in Java and other scripting languages for e.g java component, javascript, groovy, echo, logger. › Filters: only allow certain messages to continue to be processed in a flow for e.g . › Routers: control message flow to route, resequence, or split and aggregate messages in a flow for e.g All flow, Choice flow. › Scopes wrap other messages processors so as to enable them to perform together as a group. for e.g Async, Message Enricher, foreach. › Transformers convert message payload type and data format to facilitate communication between systems converters. Object to String,Body to Parameter Map. Message Processors
  • 6. › To make decisions about routing, filtering, and other common tasks. The logic of these decisions often relies on evaluating expressions. › Mule Expression Language (MEL) is the primary language used for formulating such expressions throughout Mule ESB. SIGNIFICANCE MEL
  • 7. › The message header, which contains metadata about the message › The message payload, which contains your business-specific data. MULE MESSAGE
  • 8. #[message.header.get()] This expression calls the "get" method and performs it on the object, #[message.payload[4]] the expression returns the value of the 5th item in the list. #[message.payload['type'].equals('XM L')] Check if param type is equals to XML #[message.id] This expression accesses a particular attribute associated with the specified context object. #[message.payload] Returns payload. #[2 + 2 == 4] This expression uses an operator to perform a comparison. It evaluates to true. MULE EXPRESSION LANGUAGE
  • 9. › EndPoints › Ajax: this allows mule events to be asynchronously received to and from web. › File: Allows mule application to read and write into local file system. › Http: Allow mule events to be connected with http protocol. › Jms: Allow mule events to read and send message to queue with JMS API. Components
  • 10. › Commonly Used Component › Use a Logger component to log activities in the flow as they occur. › Use an Expression component to evaluate a particular expression upon a message in a flow. › Use an Echo component to return the payload of a message as a call response. › Use a Flow Ref component to access another flow from within a flow. Component cont.
  • 11. › Mule message filters are message processors that follow the enterprise integration pattern called Message Filter. Message Filters
  • 12. › A filter that discards incoming HTTP requests › ……… <flow name="filteredFlow2"> <http:inbound-endpoint host="localhost" port="8000" path="orders"/> <expression-filter expression="message.inboundProperties['Authorization'] != null"/> <component class="org.my.OrderProcessingComponent" /> </flow>….. Message filters cont.
  • 13. › A choice router is a message processor that decides where to send a message based on their contents. › A choice exception strategy is a way of deciding which way to route a message that must deviate from the normal processing path. Choice exception strategies use MEL expressions. Choice routers
  • 15. › <flow name="downloadsSorterFlow"> › <file:inbound-endpoint path="/home/me/downloads" /> › <choice> › <when expression="#[message.inboundProperties['filename'].endsWith('.jpg']"> › <file:outbound-endpoint path="/home/me/photos" /> › </when> › <when expression="#[message.inboundProperties['filename'].endsWith('.doc')]"> › <file:outbound-endpoint path="#[/home/me/docs" /> › </when> › <otherwise> › <file:outbound-endpoint path="/home/me/misc"/> › </otherwise> › </choice> › </flow> XML CONFIGURATION
  • 16. › Mule invokes a Messaging Exception Strategy whenever an exception is thrown within a flow. Exception STRATEGY
  • 17. › An expression transformer is a message processor that executes expressions on the current message. The results of the expressions replace the payload. › This transformer transforms the message by appending “Received !” to the message payload. › <expression-transformer expression="#[message.payload + 'Received!']"/> Expression transformers
  • 18. › A logger is a message processor that logs message via Mules logging sub-system. › The message to be logged is configured as an attribute of the logger. This message attribute supports tokens (placeholders). The tokens can contain MEL expressions. <logger message="File Received (size = #[message.inboundProperties['fileSize']/1024] kb)" level="INFO" /> Loggers
  • 19. › Extract the downloaded MuleStudio binary into a folder › Go to bin folder Run MuleStudio.exe › To create new project file->mule project SETUP IDE
  • 21. • CONTENT BASED ROUTING • JMS EXAMPLE • STRATEGIC EXCEPTION DEMO
  • 23. • Import a project into a mule studio choice example. • Right click on the project –start as mule project • Watch the logs whether project is deployed successfully. • Execute following url to get XML response • http://localhost:1001/?name=Muley&amount=20000&term=48&ssn=12 34&type=XML • Execute following url to get different response • http://localhost:1001/?name=Muley&amount=20000&term=48&ssn=12 34&type=othervalue How to run
  • 25. › Start Apache mq › Import jmsexample into mule studio, deploy the project. › Open http://localhost:8161/admin/queues.jsp . click on send tab, Message gui will appear, select queue as queue1 and set body content either 1001 or 1002 or 1003 for valid content or other value to set error messages . › Watch console logs, payload for each flow will appear. › Success message will enqueue in customerqueue › Error message will enqueue in errorqueue Steps to run
  • 27. › Start Apache mq › Import catchexception strategy into mule studio, deploy the project by running project as mule application. › Open http://localhost:8161/admin/queues.jsp . click on send tab, Message gui will appear, select queue as queue1 and set body content either ERROR OR TEST OR othervalue › Watch console logs, payload for each flow will appear. Steps to run
  • 28. › MEL http://www.mulesoft.org/documentation/display/current/Introduction+to+ Expressions+in+Mule › Cheat Sheat ttp://www.mulesoft.org/documentation/display/current/MEL+Cheat+Sheet › Transformers http://www.mulesoft.org/documentation/display/current/Transformers ESB References