SlideShare a Scribd company logo
1 of 11
Mulesoft
Idempotent Message Filter
https://docs.mulesoft.com/mule-user-guide/v/3.8/idempotent-filter
Kumar Gaurav
k10gaurav@gmail.com
Agenda
• About
• Ways to achieve uniqueness
• Sample use case
• Demonstration
• Testing
• Conclusion
About
This filter ensures that only unique messages are received
by a service by checking the unique ID of the incoming
message.
This filter also ensures removal of duplicate messages i.e it
will not allow duplicate messages to pass through.
Ways to achieve uniqueness
Through idempotent filter, there are following ways to achieve uniqueness of
messages:
 core: in-memory-store
 core: simple-text-file-store
 core: custom-object-store
 core: managed-store
We’ll see how message uniqueness can be achieved through simple-text-file-
store with a sample use case in this presentation.
Sample use case
Let’s consider there is a link with unique uri parameter i.e. basically it contains
unique key to validate user request. With the help of message idempotent
filter each request will be validated, here we’ll see for static user
request(similarly dynamic can be achieved).
Sample URI for uniqueness: http://localhost:8081/idempotent/case1
Here case1 is considered as unique parameter/endpoint for a particular
request.
Demonstration
Let’s design a flow as shown below and make sure that Idempotent Message
filter has simple-text-file-store as object store location.
[Please refer next slide for configuration of individual components shown in the design]
Continue
Corresponding XML would be:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-
beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"
basePath="idempotent"/>
<flow name="IdempotentFilterFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/case1" doc:name="HTTP"/>
<idempotent-message-filter doc:name="Idempotent Message" throwOnUnaccepted="true" idExpression="#[message:payload]">
<simple-text-file-store directory="./idempotent"/>
</idempotent-message-filter>
<logger level="INFO" doc:name="Logger" message="Passed here!"/>
<set-payload doc:name="Set Payload" value="Passed in payload also!"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<set-payload value="Duplicate message exception!" doc:name="Set Payload"/>
</catch-exception-strategy>
</flow>
</mule>
Testing
Now let’s starting testing our application.
Initial request Second request
So, by using Idempotent Message filter, it restricts duplicate
messages/request.
Continue…
Also let’s see the object store location specified inside Idempotent Message
filter settings. It contains messages with unique ID:
Conclusion
So by this way we have seen that Idempotent Message filter is one of the
fantastic component provided in mule to support message/request
uniqueness.
There is just a few soft code done by the integration engineer to achieve the
most wanted security feature and that just ion the fly.
Thank you!

More Related Content

What's hot

Mule requester
Mule requesterMule requester
Mule requesterSindhu VL
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSreekanth Kondapalli
 
Elements in a mule flow
Elements in a mule flowElements in a mule flow
Elements in a mule flowSindhu VL
 
Mule integration
Mule integrationMule integration
Mule integrationSon Nguyen
 
Mule high availability
Mule high availabilityMule high availability
Mule high availabilitySon Nguyen
 
Mule esb parts
Mule esb partsMule esb parts
Mule esb partsSindhu VL
 
Mule chapter2
Mule chapter2Mule chapter2
Mule chapter2mha4
 
Mule esb made system integration easy
Mule esb made system integration easyMule esb made system integration easy
Mule esb made system integration easySudha Ch
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in muleMohammed246
 

What's hot (15)

Mule esb
Mule esbMule esb
Mule esb
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule requester
Mule requesterMule requester
Mule requester
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Elements in a mule flow
Elements in a mule flowElements in a mule flow
Elements in a mule flow
 
Mule connectors
Mule  connectorsMule  connectors
Mule connectors
 
Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in mule
 
Mule integration
Mule integrationMule integration
Mule integration
 
Mule 3.8
Mule 3.8Mule 3.8
Mule 3.8
 
Mule message
Mule messageMule message
Mule message
 
Mule high availability
Mule high availabilityMule high availability
Mule high availability
 
Mule esb parts
Mule esb partsMule esb parts
Mule esb parts
 
Mule chapter2
Mule chapter2Mule chapter2
Mule chapter2
 
Mule esb made system integration easy
Mule esb made system integration easyMule esb made system integration easy
Mule esb made system integration easy
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
 

Viewers also liked

Mule functional, blackbox, unit testing
Mule functional, blackbox, unit testingMule functional, blackbox, unit testing
Mule functional, blackbox, unit testingveena naresh
 
Mule microsoft environment
Mule  microsoft environmentMule  microsoft environment
Mule microsoft environmentvishnukanthro45
 
Researchmethodolgy by Eng:ahmed Ali Ahhmed
Researchmethodolgy by Eng:ahmed Ali AhhmedResearchmethodolgy by Eng:ahmed Ali Ahhmed
Researchmethodolgy by Eng:ahmed Ali AhhmedAhmed Ali Ahmed
 
Estratégia api e design
Estratégia api e designEstratégia api e design
Estratégia api e designJeison Barros
 
Implementing an Esb using Mule
Implementing an Esb using MuleImplementing an Esb using Mule
Implementing an Esb using MuleAbdulImrankhan7
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport referencekumar gaurav
 
Handle File on mule
Handle File on muleHandle File on mule
Handle File on muleSon Nguyen
 
Creating restful api using mule esb
Creating restful api using mule esbCreating restful api using mule esb
Creating restful api using mule esbRaviShankar Mishra
 
Διαδερμική Σπονδυλοπλαστική
Διαδερμική ΣπονδυλοπλαστικήΔιαδερμική Σπονδυλοπλαστική
Διαδερμική ΣπονδυλοπλαστικήRadiology Archives
 
Panel Informativo
Panel InformativoPanel Informativo
Panel Informativomarimarpego
 
Using maven with mule
Using maven with muleUsing maven with mule
Using maven with muleSindhu VL
 

Viewers also liked (20)

ALESSIA CARNEVALI en
ALESSIA CARNEVALI enALESSIA CARNEVALI en
ALESSIA CARNEVALI en
 
Mule functional, blackbox, unit testing
Mule functional, blackbox, unit testingMule functional, blackbox, unit testing
Mule functional, blackbox, unit testing
 
How to make ... Cincopa
How to make ... CincopaHow to make ... Cincopa
How to make ... Cincopa
 
Mule microsoft environment
Mule  microsoft environmentMule  microsoft environment
Mule microsoft environment
 
Researchmethodolgy by Eng:ahmed Ali Ahhmed
Researchmethodolgy by Eng:ahmed Ali AhhmedResearchmethodolgy by Eng:ahmed Ali Ahhmed
Researchmethodolgy by Eng:ahmed Ali Ahhmed
 
Estratégia api e design
Estratégia api e designEstratégia api e design
Estratégia api e design
 
Implementing an Esb using Mule
Implementing an Esb using MuleImplementing an Esb using Mule
Implementing an Esb using Mule
 
Pdfteste
PdftestePdfteste
Pdfteste
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport reference
 
Attested Degree
Attested Degree Attested Degree
Attested Degree
 
Handle File on mule
Handle File on muleHandle File on mule
Handle File on mule
 
Slidely how to
Slidely how to Slidely how to
Slidely how to
 
Creating restful api using mule esb
Creating restful api using mule esbCreating restful api using mule esb
Creating restful api using mule esb
 
Διαδερμική Σπονδυλοπλαστική
Διαδερμική ΣπονδυλοπλαστικήΔιαδερμική Σπονδυλοπλαστική
Διαδερμική Σπονδυλοπλαστική
 
Pilandok report
Pilandok reportPilandok report
Pilandok report
 
Panel Informativo
Panel InformativoPanel Informativo
Panel Informativo
 
Using maven with mule
Using maven with muleUsing maven with mule
Using maven with mule
 
ανακοινωση
ανακοινωσηανακοινωση
ανακοινωση
 
Odontologikh exetash
Odontologikh exetashOdontologikh exetash
Odontologikh exetash
 
Naging sultan si pilandok
Naging sultan si pilandokNaging sultan si pilandok
Naging sultan si pilandok
 

Similar to Mulesoft idempotent Message Filter

Message properties component
Message properties component Message properties component
Message properties component Sunil Komarapu
 
Message properties component
Message properties componentMessage properties component
Message properties componentF K
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mulejaveed_mhd
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentirfan1008
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentPhaniu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentmdfkhan625
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentprinceirfancivil
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentSunil Komarapu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentKhasim Saheb
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in MuleKhan625
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentAnand kalla
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in muleRajkattamuri
 
Filter expression
Filter expression Filter expression
Filter expression F K
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mulejaveed_mhd
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentmaheshtheapex
 
Mule Idempotent Filter - Part II
Mule Idempotent Filter - Part IIMule Idempotent Filter - Part II
Mule Idempotent Filter - Part IIRAMANAN T D
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filterSunil Komarapu
 

Similar to Mulesoft idempotent Message Filter (20)

Message properties component
Message properties component Message properties component
Message properties component
 
Message properties component
Message properties componentMessage properties component
Message properties component
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in Mule
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use processor chain
How to use processor chainHow to use processor chain
How to use processor chain
 
Filter expression
Filter expression Filter expression
Filter expression
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
Filter expression
Filter expression Filter expression
Filter expression
 
Filter expression
Filter expressionFilter expression
Filter expression
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Mule Idempotent Filter - Part II
Mule Idempotent Filter - Part IIMule Idempotent Filter - Part II
Mule Idempotent Filter - Part II
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 

More from kumar gaurav

Need Of Enterprise Integration
Need Of Enterprise IntegrationNeed Of Enterprise Integration
Need Of Enterprise Integrationkumar gaurav
 
Mulesoft file connector
Mulesoft file connectorMulesoft file connector
Mulesoft file connectorkumar gaurav
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connectorkumar gaurav
 
Reason to connect with Mulesoft
Reason to connect with MulesoftReason to connect with Mulesoft
Reason to connect with Mulesoftkumar gaurav
 
Mulesoft Using Groovy Component
Mulesoft Using Groovy ComponentMulesoft Using Groovy Component
Mulesoft Using Groovy Componentkumar gaurav
 
Mulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other ApplicationsMulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other Applicationskumar gaurav
 
Mulesoft Solutions for Mobile
Mulesoft Solutions for MobileMulesoft Solutions for Mobile
Mulesoft Solutions for Mobilekumar gaurav
 
Mulesoft Solutions for SOA
Mulesoft Solutions for SOAMulesoft Solutions for SOA
Mulesoft Solutions for SOAkumar gaurav
 
Mulesoft Solutions for IoT
Mulesoft Solutions for IoTMulesoft Solutions for IoT
Mulesoft Solutions for IoTkumar gaurav
 
Mulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIsMulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIskumar gaurav
 
Oracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authenticationOracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authenticationkumar gaurav
 
Java collections concept
Java collections conceptJava collections concept
Java collections conceptkumar gaurav
 
Struggle that counts
Struggle that countsStruggle that counts
Struggle that countskumar gaurav
 
MySQL index optimization techniques
MySQL index optimization techniquesMySQL index optimization techniques
MySQL index optimization techniqueskumar gaurav
 
Security guidelines for web development
Security guidelines for web developmentSecurity guidelines for web development
Security guidelines for web developmentkumar gaurav
 
Oracle web center suit
Oracle web center suitOracle web center suit
Oracle web center suitkumar gaurav
 

More from kumar gaurav (20)

Need Of Enterprise Integration
Need Of Enterprise IntegrationNeed Of Enterprise Integration
Need Of Enterprise Integration
 
Mulesoft file connector
Mulesoft file connectorMulesoft file connector
Mulesoft file connector
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connector
 
Reason to connect with Mulesoft
Reason to connect with MulesoftReason to connect with Mulesoft
Reason to connect with Mulesoft
 
Mulesoft Using Groovy Component
Mulesoft Using Groovy ComponentMulesoft Using Groovy Component
Mulesoft Using Groovy Component
 
Mulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other ApplicationsMulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other Applications
 
Mulesoft Solutions for Mobile
Mulesoft Solutions for MobileMulesoft Solutions for Mobile
Mulesoft Solutions for Mobile
 
Mulesoft Solutions for SOA
Mulesoft Solutions for SOAMulesoft Solutions for SOA
Mulesoft Solutions for SOA
 
Mulesoft Solutions for IoT
Mulesoft Solutions for IoTMulesoft Solutions for IoT
Mulesoft Solutions for IoT
 
Mulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIsMulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIs
 
Oracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authenticationOracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authentication
 
Java collections concept
Java collections conceptJava collections concept
Java collections concept
 
Struggle that counts
Struggle that countsStruggle that counts
Struggle that counts
 
Team Work
Team WorkTeam Work
Team Work
 
MySQL index optimization techniques
MySQL index optimization techniquesMySQL index optimization techniques
MySQL index optimization techniques
 
Security guidelines for web development
Security guidelines for web developmentSecurity guidelines for web development
Security guidelines for web development
 
Java web services
Java web servicesJava web services
Java web services
 
Oracle web center suit
Oracle web center suitOracle web center suit
Oracle web center suit
 
jQuery Beginner
jQuery BeginnerjQuery Beginner
jQuery Beginner
 
Mulesoft flows
Mulesoft flowsMulesoft flows
Mulesoft flows
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Mulesoft idempotent Message Filter

  • 2. Agenda • About • Ways to achieve uniqueness • Sample use case • Demonstration • Testing • Conclusion
  • 3. About This filter ensures that only unique messages are received by a service by checking the unique ID of the incoming message. This filter also ensures removal of duplicate messages i.e it will not allow duplicate messages to pass through.
  • 4. Ways to achieve uniqueness Through idempotent filter, there are following ways to achieve uniqueness of messages:  core: in-memory-store  core: simple-text-file-store  core: custom-object-store  core: managed-store We’ll see how message uniqueness can be achieved through simple-text-file- store with a sample use case in this presentation.
  • 5. Sample use case Let’s consider there is a link with unique uri parameter i.e. basically it contains unique key to validate user request. With the help of message idempotent filter each request will be validated, here we’ll see for static user request(similarly dynamic can be achieved). Sample URI for uniqueness: http://localhost:8081/idempotent/case1 Here case1 is considered as unique parameter/endpoint for a particular request.
  • 6. Demonstration Let’s design a flow as shown below and make sure that Idempotent Message filter has simple-text-file-store as object store location. [Please refer next slide for configuration of individual components shown in the design]
  • 7. Continue Corresponding XML would be: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring- beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd"> <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration" basePath="idempotent"/> <flow name="IdempotentFilterFlow"> <http:listener config-ref="HTTP_Listener_Configuration" path="/case1" doc:name="HTTP"/> <idempotent-message-filter doc:name="Idempotent Message" throwOnUnaccepted="true" idExpression="#[message:payload]"> <simple-text-file-store directory="./idempotent"/> </idempotent-message-filter> <logger level="INFO" doc:name="Logger" message="Passed here!"/> <set-payload doc:name="Set Payload" value="Passed in payload also!"/> <catch-exception-strategy doc:name="Catch Exception Strategy"> <set-payload value="Duplicate message exception!" doc:name="Set Payload"/> </catch-exception-strategy> </flow> </mule>
  • 8. Testing Now let’s starting testing our application. Initial request Second request So, by using Idempotent Message filter, it restricts duplicate messages/request.
  • 9. Continue… Also let’s see the object store location specified inside Idempotent Message filter settings. It contains messages with unique ID:
  • 10. Conclusion So by this way we have seen that Idempotent Message filter is one of the fantastic component provided in mule to support message/request uniqueness. There is just a few soft code done by the integration engineer to achieve the most wanted security feature and that just ion the fly.