SlideShare a Scribd company logo
Routing
Vasanthi
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.
M filtering
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

More Related Content

PPTX
Routing and filters
PPTX
PPTX
Mule splitters
PPTX
Splitter flow control reference
PPTX
Mule splitters
PPT
Types of flows in mulesoft
PPTX
Splitters in mule
PPTX
Scatter-Gather
Routing and filters
Mule splitters
Splitter flow control reference
Mule splitters
Types of flows in mulesoft
Splitters in mule
Scatter-Gather

What's hot (7)

ODP
Mule flow processing strategies
PPTX
Mule filters
PPTX
Types of MessageRouting in Mule
PPTX
Mule enricher
PPTX
Anypoint Studio - Mule ESB Error Handling
PPTX
Thread Management In Mule
PPTX
Java Components and their applicability in Mule Anypoint Studio
Mule flow processing strategies
Mule filters
Types of MessageRouting in Mule
Mule enricher
Anypoint Studio - Mule ESB Error Handling
Thread Management In Mule
Java Components and their applicability in Mule Anypoint Studio
Ad

Similar to M filtering (20)

PPTX
Routing in mule
PPTX
Mule routing and filters
PPTX
Routing in mule
PPTX
Mule splitters
PPT
Wcf routing kt
PDF
Mule esb and_relevant_components
PPTX
Mule esb overview
PPTX
Performance tuning in mule
PPTX
M expression
PPTX
Mule concepts flows
PPTX
Mule scopes 2
PPTX
Mule esb naveen
PPTX
Niranjan mule esb
PPTX
Muleflowarchitecturepart2
PPTX
Controlling Message Flow - Mule ESB
PDF
Mule ESB Interview or Certification questions
PPTX
Mule message processor or routers
PPTX
Controlling message flow
PPTX
PPTX
Esb process
Routing in mule
Mule routing and filters
Routing in mule
Mule splitters
Wcf routing kt
Mule esb and_relevant_components
Mule esb overview
Performance tuning in mule
M expression
Mule concepts flows
Mule scopes 2
Mule esb naveen
Niranjan mule esb
Muleflowarchitecturepart2
Controlling Message Flow - Mule ESB
Mule ESB Interview or Certification questions
Mule message processor or routers
Controlling message flow
Esb process
Ad

More from Vasanthii Chowdary (6)

PPTX
M messaging 2
PPTX
M messaging 1
PPTX
M enrichment
PPTX
M property
PPTX
M system prop
PPTX
M batching
M messaging 2
M messaging 1
M enrichment
M property
M system prop
M batching

Recently uploaded (20)

PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
RMMM.pdf make it easy to upload and study
PDF
Classroom Observation Tools for Teachers
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Trump Administration's workforce development strategy
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Lesson notes of climatology university.
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Introduction to Building Materials
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Final Presentation General Medicine 03-08-2024.pptx
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
RMMM.pdf make it easy to upload and study
Classroom Observation Tools for Teachers
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Hazard Identification & Risk Assessment .pdf
Chinmaya Tiranga quiz Grand Finale.pdf
Trump Administration's workforce development strategy
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Indian roads congress 037 - 2012 Flexible pavement
A systematic review of self-coping strategies used by university students to ...
Lesson notes of climatology university.
Complications of Minimal Access Surgery at WLH
Orientation - ARALprogram of Deped to the Parents.pptx
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Digestion and Absorption of Carbohydrates, Proteina and Fats
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Introduction to Building Materials

M filtering

  • 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.
  • 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.