SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Mule Expression Routing
GSN-K
Routing
 The Routing module reviews the different types of Routers and how
Routers are used to control how messages are sent and received by
components. The message can be route in different ways. Below are
explained in this example.
• Splitters and Aggregators
• Collection splitter and Collection Aggregator
• Message chunk splitter and Message chunk aggregator
• Scatter gather
• For each
• Mule flows, Sub flows and flow reference
• Filters
For Each:
 The Foreach scope splits a collection into elements and processes
them iteratively through the processors embedded in the scope, then
returns the original message to the flow.
 As For Each expects a collection object is expected a java component
is used to generate a List object.
 Above properties are available in for each scope. Collection field which
accepts MEL to provide a collection object to the for each component
for iteration. Counter Variable Name is a variable which stores the
count of iterations. Batch Size is partition the Collection into sub
collections of the specified size. Root Message Variable Name holds
the message before being split.
Main Flow, Sub Flow and Flow reference:
 A mule flow (main flow) which accepts message source and message
processor where sub flow accepts only message processor. Sub flow
can be called via flow reference because it doesn't accept messag
source.
 Sub flow runs completely in the same context of the flow that calls it,
inheriting transcation context, exception handler, all variables and
headers, etc.
 A Main flow has its own context, transcation context, exception
handler, all variables and headers etc.
Filters:
 Filters are used to filter the message using mule expressions.
 Above flow accepts a HTTP request and filters the message using
Expression filter and also throws an exception if Expression filter is
not satisfied using Message Filter.
 Expression Filter allows you to right a Mule Expression. if the
expression returns true then the process continuous to next message
processor. or else the flow get discarded without throwing any
exception. Here the condition is checking for payload instance is
java.util.List or not.
 If we need to throw an exception when Expression Filter returns false,
then Expression filter needs wrapped up the Message Filter and
throwOnUnaccecpted attribute should be true as shown in below
snippet.
Thank You All

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Bindings of components in mule
Bindings of components in muleBindings of components in mule
Bindings of components in mule
 
Message structure
Message structureMessage structure
Message structure
 
Controlling message flow
Controlling message flowControlling message flow
Controlling message flow
 
Mule Custom Aggregator
Mule Custom AggregatorMule Custom Aggregator
Mule Custom Aggregator
 
Mule servlet connector
Mule servlet connectorMule servlet connector
Mule servlet connector
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
 
Mule scopes request_response_scope
Mule scopes request_response_scopeMule scopes request_response_scope
Mule scopes request_response_scope
 
Mule batch
Mule batchMule batch
Mule batch
 
Muleflowarchitecturepart2
Muleflowarchitecturepart2Muleflowarchitecturepart2
Muleflowarchitecturepart2
 
Testing mule
Testing   muleTesting   mule
Testing mule
 
Mule any point studio
Mule any point studioMule any point studio
Mule any point studio
 
Mule scopes foreach_scope
Mule scopes foreach_scopeMule scopes foreach_scope
Mule scopes foreach_scope
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
Flows and subflows in mule
Flows and subflows in muleFlows and subflows in mule
Flows and subflows in mule
 
Connectors in mule
Connectors in muleConnectors in mule
Connectors in mule
 
Mule MongoDB connector
Mule MongoDB connectorMule MongoDB connector
Mule MongoDB connector
 
The Mule Agent
The Mule AgentThe Mule Agent
The Mule Agent
 
Mule rabbitmq
Mule rabbitmqMule rabbitmq
Mule rabbitmq
 
Mule advanced
Mule advancedMule advanced
Mule advanced
 
Scatter gather component - mule
Scatter gather component - muleScatter gather component - mule
Scatter gather component - mule
 

Andere mochten auch

Andere mochten auch (17)

Mule connectors
Mule  connectorsMule  connectors
Mule connectors
 
Generating Documentation for Mule ESB Application
Generating Documentation for Mule ESB ApplicationGenerating Documentation for Mule ESB Application
Generating Documentation for Mule ESB Application
 
Mule deploying a cloud hub application
Mule deploying a cloud hub applicationMule deploying a cloud hub application
Mule deploying a cloud hub application
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
Mule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutesMule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutes
 
MuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to DatabaseMuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to Database
 
Demo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook ConnectorDemo on Mule ESB Facebook Connector
Demo on Mule ESB Facebook Connector
 
Timer Interceptor in Mule
Timer Interceptor in MuleTimer Interceptor in Mule
Timer Interceptor in Mule
 
Mule esb transformers
Mule esb transformersMule esb transformers
Mule esb transformers
 
Mule Expression language
Mule Expression languageMule Expression language
Mule Expression language
 
Mule ESB Training
Mule ESB TrainingMule ESB Training
Mule ESB Training
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Future of Integration | MuleSoft
Future of Integration | MuleSoftFuture of Integration | MuleSoft
Future of Integration | MuleSoft
 
Mule ESB Tutorial Part 1
Mule ESB Tutorial Part 1Mule ESB Tutorial Part 1
Mule ESB Tutorial Part 1
 
Microservices Best Practices
Microservices Best Practices Microservices Best Practices
Microservices Best Practices
 
Mule ESB Fundamentals
Mule ESB FundamentalsMule ESB Fundamentals
Mule ESB Fundamentals
 
Mule ESB - Integration Simplified
Mule ESB - Integration SimplifiedMule ESB - Integration Simplified
Mule ESB - Integration Simplified
 

Ähnlich wie Mule routing and filters

Ähnlich wie Mule routing and filters (20)

M filtering
M filteringM filtering
M filtering
 
Routing in mule
Routing in muleRouting in mule
Routing in mule
 
Types of MessageRouting in Mule
Types of MessageRouting in MuleTypes of MessageRouting in Mule
Types of MessageRouting in Mule
 
Routing and filters
Routing and filtersRouting and filters
Routing and filters
 
M split
M splitM split
M split
 
Splitter flow control reference
Splitter flow control referenceSplitter flow control reference
Splitter flow control reference
 
Mule esb and_relevant_components
Mule esb and_relevant_componentsMule esb and_relevant_components
Mule esb and_relevant_components
 
Wcf routing kt
Wcf routing ktWcf routing kt
Wcf routing kt
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routers
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routers
 
Mule ESB Interview or Certification questions
Mule ESB Interview or Certification questionsMule ESB Interview or Certification questions
Mule ESB Interview or Certification questions
 
Top 50 MuleSoft interview questions
Top 50 MuleSoft interview questionsTop 50 MuleSoft interview questions
Top 50 MuleSoft interview questions
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestration
 
Mule integration
Mule integrationMule integration
Mule integration
 
Elements in a muleflow
Elements in a muleflowElements in a muleflow
Elements in a muleflow
 
Service orchestration by using flows
Service orchestration by using flowsService orchestration by using flows
Service orchestration by using flows
 
Service orchestration by using flows
Service orchestration by using flowsService orchestration by using flows
Service orchestration by using flows
 
M expression
M expressionM expression
M expression
 
Elements in a mule flow
Elements in a mule flowElements in a mule flow
Elements in a mule flow
 

Mehr von Gandham38 (6)

Java mule
Java muleJava mule
Java mule
 
Mule system properties
Mule system propertiesMule system properties
Mule system properties
 
Mule properties
Mule propertiesMule properties
Mule properties
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
 
Mule jms-topics
Mule jms-topicsMule jms-topics
Mule jms-topics
 
Mule enricher component
Mule enricher component Mule enricher component
Mule enricher component
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

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)
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
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
 
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.
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
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...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
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
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

Mule routing and filters

  • 2. Routing  The Routing module reviews the different types of Routers and how Routers are used to control how messages are sent and received by components. The message can be route in different ways. Below are explained in this example. • Splitters and Aggregators • Collection splitter and Collection Aggregator • Message chunk splitter and Message chunk aggregator • Scatter gather • For each • Mule flows, Sub flows and flow reference • Filters
  • 3. For Each:  The Foreach scope splits a collection into elements and processes them iteratively through the processors embedded in the scope, then returns the original message to the flow.
  • 4.  As For Each expects a collection object is expected a java component is used to generate a List object.  Above properties are available in for each scope. Collection field which accepts MEL to provide a collection object to the for each component for iteration. Counter Variable Name is a variable which stores the count of iterations. Batch Size is partition the Collection into sub collections of the specified size. Root Message Variable Name holds the message before being split.
  • 5. Main Flow, Sub Flow and Flow reference:  A mule flow (main flow) which accepts message source and message processor where sub flow accepts only message processor. Sub flow can be called via flow reference because it doesn't accept messag source.  Sub flow runs completely in the same context of the flow that calls it, inheriting transcation context, exception handler, all variables and headers, etc.  A Main flow has its own context, transcation context, exception handler, all variables and headers etc.
  • 6.
  • 7. Filters:  Filters are used to filter the message using mule expressions.  Above flow accepts a HTTP request and filters the message using Expression filter and also throws an exception if Expression filter is not satisfied using Message Filter.
  • 8.  Expression Filter allows you to right a Mule Expression. if the expression returns true then the process continuous to next message processor. or else the flow get discarded without throwing any exception. Here the condition is checking for payload instance is java.util.List or not.
  • 9.  If we need to throw an exception when Expression Filter returns false, then Expression filter needs wrapped up the Message Filter and throwOnUnaccecpted attribute should be true as shown in below snippet.