SlideShare a Scribd company logo
Karthik
*
*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

More Related Content

Viewers also liked

Viewers also liked (11)

Technical research (Multi- camera)
Technical research  (Multi- camera)Technical research  (Multi- camera)
Technical research (Multi- camera)
 
Our set in stone locations!
Our set in stone locations!Our set in stone locations!
Our set in stone locations!
 
Form research (2)
Form research (2)Form research (2)
Form research (2)
 
Genre research A2
Genre research A2Genre research A2
Genre research A2
 
Evaluation 1 (Revised)
Evaluation 1 (Revised)Evaluation 1 (Revised)
Evaluation 1 (Revised)
 
Evaluation [Question 1 (II)]
Evaluation [Question 1 (II)]Evaluation [Question 1 (II)]
Evaluation [Question 1 (II)]
 
Mule java part-2
Mule java part-2Mule java part-2
Mule java part-2
 
What types of documentary are there
What types of documentary are thereWhat types of documentary are there
What types of documentary are there
 
Mule java part-3
Mule java part-3Mule java part-3
Mule java part-3
 
Http mule
Http muleHttp mule
Http mule
 
Https service mule
Https service muleHttps service mule
Https service mule
 

Similar to Routing and filters

Similar to Routing and filters (20)

Mule routing and filters
Mule routing and filtersMule routing and filters
Mule routing and filters
 
Routing in mule
Routing in muleRouting in mule
Routing in mule
 
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
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
Splitters in mule
Splitters in muleSplitters in mule
Splitters in mule
 
M split
M splitM split
M split
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
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
 
Splitter flow control reference
Splitter flow control referenceSplitter flow control reference
Splitter flow control reference
 
Mule expression component
Mule expression componentMule expression component
Mule expression component
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
 
Mule scopes foreach_scope
Mule scopes foreach_scopeMule scopes foreach_scope
Mule scopes foreach_scope
 
M expression
M expressionM expression
M expression
 
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
 
Module 5 APP+Sess+Pres layer.pptx
Module 5 APP+Sess+Pres layer.pptxModule 5 APP+Sess+Pres layer.pptx
Module 5 APP+Sess+Pres layer.pptx
 
Mule ESB Interview or Certification questions
Mule ESB Interview or Certification questionsMule ESB Interview or Certification questions
Mule ESB Interview or Certification questions
 

More from Karnam Karthik (10)

Mule system properties
Mule system propertiesMule system properties
Mule system properties
 
Mule properties
Mule propertiesMule properties
Mule properties
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
 
Mule batch
Mule batchMule batch
Mule batch
 
Jms queues
Jms queuesJms queues
Jms queues
 
Jms topics
Jms   topicsJms   topics
Jms topics
 
Mule java part-4
Mule java part-4Mule java part-4
Mule java part-4
 
Mule java part-3
Mule java part-3Mule java part-3
Mule java part-3
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 

Recently uploaded

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 

Recently uploaded (20)

Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 

Routing and filters

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