SlideShare une entreprise Scribd logo
1  sur  14
Mule Message
| ©2013, Cognizant
1
Mule Properties and FlowVariables are one of the most widely used features in Mule.
Nevertheless, Mule newcomers may have a hard time understanding how the different
property scopes and variables compare to each other, and how to choose the right one for
their use cases.
Messaging Framework
 A message is simply a packet of data that can be handled and sent between
applications on a specific channel (also called a queue).
 Many applications don't have the ability to read or process data coming from
another application.
 Mule ESB solves this problem by providing a messaging framework that reads,
transforms, and sends data as messages between applications.
A Mule message is composed of different parts:
 The payload, which is the main data content carried
by the message.
 The properties, which contain the meta information
very much like the header of a SOAP envelope or the
properties of a JMS message.
 If required, a series of attachments that can
accompany the message
Mule vs. Traditional ESB
 Difference between Mule and a traditional ESB is that Mule only converts data as
needed.
 Traditional ESB
 Need to create an adapter for every application, connect to the bus and convert
the application's data into a single common messaging format.
 To develop adapter and process message require a lot of time.
 Mule ESB
 Mule eliminates all these efforts.
 Mule increases performance and reduces development time over a traditional
ESB.
Messaging styles
One-way
 Receives a message and puts it on a SEDA queue.
 The calling thread returns and the message is processed by the SEDA thread
pool. Nothing gets returned from the result of the call.
 The Mule service must have an asynchronous inbound endpoint.
 If an error occurs it is handled by the Mule server.
 One-Way return types are NullPayloads
Messaging styles - contd
Request – Response
 Receives a message and the component returns a message.
 If the component call returns null, then a Mule Message with a NullPayload is
returned.
 If the call method is void the request message is returned.
 The Mule service must have a synchronous inbound endpoint and no outbound
endpoint configured.
Messaging styles - contd
6
Synchronous
 A message is now processed synchronously if one of the following is true:
 endpoint is request-response
 A transaction is active
 The message property MULE_FORCE_SYNC is set to TRUE
 Receives a message and the component processes before sending it out on
another endpoint. The request happens in the same thread.
 Mule blocks on the outbound endpoint to wait for a response from the remote
application (if applicable) until the responseTimeout threshold is reached. If no
response is received, it returns null.
 A synchronous call always returns a result, even if there is an outbound
endpoint.
7
Messaging styles - contd
Async Request Response
 This pattern allows the back-end process to be forked to invoke other services
and return a result based on the results of multiple service invocations.
 The Async Reply Router is used to listen on a Reply To endpoint for results.
 Set the reply-to address on the outbound router, and set the <async-reply>
element to listen on that reply endpoint.
Message scope
Inbound
 Inbound properties scope will hold the headers/properties sent by the caller
flow/service/external source.
 When a message arrives to a mule endpoint it can contain headers/properties.
Those properties will be placed as inbound properties of the mule message.
 Inbound message properties are read only.
Outbound
 Outbound properties scope will contain all the properties that will be deliver
together with the message payload when calling an outbound endpoint.
 When a message is deliver to another endpoint then all the properties in
outbound scope will be sent together with the message as headers.
 After calling an outbound endpoint that returns a response outbound properties
are lost.
Message scope - contd
Message scope - contd
 Invocation
 An Invocation property will be present in the invoked flow and will last for all the
flow execution.
 Invocation properties are not propagated to other flows, but will be propagated
if another flow or sub-flow is called using flow-ref.
 Session
 Mule session scope is created when a message enters a mule flow/service and it
will preserved until the message leaves mule.
 Mule session propagation is done only when mule endpoints transport supports
message headers (i.e. JMS, HTTP, VM).
 Any change to those properties within the async flow will not be reflected in the
caller flow.
 Application
 Application properties scope is tied to the application lifecycle
 Application properties are read only.
Sample Code – Inbound Scope
Sample Code – Outbound Scope
Sample Code – Invocation Scope

Contenu connexe

Tendances

Mule esb parts
Mule esb partsMule esb parts
Mule esb partsSindhu VL
 
Scatter gather flow in mule
Scatter gather flow in muleScatter gather flow in mule
Scatter gather flow in muleSon Nguyen
 
Vm component in mule demo
Vm component in mule demoVm component in mule demo
Vm component in mule demoSudha Ch
 
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 esbRaviShankar Mishra
 
Connectors in mule
Connectors in muleConnectors in mule
Connectors in muleSindhu VL
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in muleMohammed246
 
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 esbPraneethchampion
 
Mule concepts
Mule conceptsMule concepts
Mule conceptsSindhu 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 esbAnand kalla
 
Testing mule
Testing   muleTesting   mule
Testing muleSindhu VL
 
Design flows in mule
Design flows in muleDesign flows in mule
Design flows in muleSindhu VL
 
Expression language
Expression languageExpression language
Expression languageSon Nguyen
 
MuleSoft Consuming Soap Web Service - CXF Proxy-Client Module
MuleSoft Consuming Soap Web Service - CXF Proxy-Client ModuleMuleSoft Consuming Soap Web Service - CXF Proxy-Client Module
MuleSoft Consuming Soap Web Service - CXF Proxy-Client ModuleVince Soliza
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filterkumar gaurav
 
Mule Jetty transport
Mule Jetty transportMule Jetty transport
Mule Jetty transportAnkush Sharma
 

Tendances (17)

Mule esb parts
Mule esb partsMule esb parts
Mule esb parts
 
Scatter gather flow in mule
Scatter gather flow in muleScatter gather flow in mule
Scatter gather flow in mule
 
Vm component in mule demo
Vm component in mule demoVm component in mule demo
Vm component in mule demo
 
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
 
Connectors in mule
Connectors in muleConnectors in mule
Connectors in mule
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
 
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
 
Mule concepts
Mule conceptsMule concepts
Mule concepts
 
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
 
Testing mule
Testing   muleTesting   mule
Testing mule
 
Design flows in mule
Design flows in muleDesign flows in mule
Design flows in mule
 
Expression language
Expression languageExpression language
Expression language
 
MuleSoft Consuming Soap Web Service - CXF Proxy-Client Module
MuleSoft Consuming Soap Web Service - CXF Proxy-Client ModuleMuleSoft Consuming Soap Web Service - CXF Proxy-Client Module
MuleSoft Consuming Soap Web Service - CXF Proxy-Client Module
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filter
 
Mule Jetty transport
Mule Jetty transportMule Jetty transport
Mule Jetty transport
 
Mule velocity
Mule velocityMule velocity
Mule velocity
 
Mule esb
Mule esbMule esb
Mule esb
 

En vedette

Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routersSon Nguyen
 
Mule sap connector
Mule sap connectorMule sap connector
Mule sap connectorSon Nguyen
 
Mule any point studio
Mule any point studioMule any point studio
Mule any point studioSon Nguyen
 
Mulesoft intergrate for android app
Mulesoft intergrate for android appMulesoft intergrate for android app
Mulesoft intergrate for android appSon Nguyen
 
Using groovy in mule
Using groovy in muleUsing groovy in mule
Using groovy in muleSon Nguyen
 
Running mule standalone
Running mule standaloneRunning mule standalone
Running mule standaloneSon Nguyen
 
Mule enterprise service introduction
Mule enterprise service introductionMule enterprise service introduction
Mule enterprise service introductionSon Nguyen
 
Cloud hub with mule
Cloud hub with muleCloud hub with mule
Cloud hub with muleSon Nguyen
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in muleSon Nguyen
 
Xslt with mule
Xslt with muleXslt with mule
Xslt with muleSon Nguyen
 
Mule high availability
Mule high availabilityMule high availability
Mule high availabilitySon Nguyen
 
Sap integration by mule esb
Sap integration by mule esbSap integration by mule esb
Sap integration by mule esbSon Nguyen
 
Query in share point by mule
Query in share point by muleQuery in share point by mule
Query in share point by muleSon Nguyen
 
Logging configuration in mule
Logging configuration in muleLogging configuration in mule
Logging configuration in muleSon Nguyen
 
Rest security in mule
Rest security in muleRest security in mule
Rest security in muleSon Nguyen
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introductionSon Nguyen
 
Mule flow complete
Mule flow completeMule flow complete
Mule flow completeSon Nguyen
 
Retrieve microsoft data
Retrieve microsoft dataRetrieve microsoft data
Retrieve microsoft dataSon Nguyen
 

En vedette (20)

Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routers
 
Mule sap connector
Mule sap connectorMule sap connector
Mule sap connector
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule any point studio
Mule any point studioMule any point studio
Mule any point studio
 
Mulesoft intergrate for android app
Mulesoft intergrate for android appMulesoft intergrate for android app
Mulesoft intergrate for android app
 
Mule esb
Mule esbMule esb
Mule esb
 
Using groovy in mule
Using groovy in muleUsing groovy in mule
Using groovy in mule
 
Running mule standalone
Running mule standaloneRunning mule standalone
Running mule standalone
 
Mule enterprise service introduction
Mule enterprise service introductionMule enterprise service introduction
Mule enterprise service introduction
 
Cloud hub with mule
Cloud hub with muleCloud hub with mule
Cloud hub with mule
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
 
Xslt with mule
Xslt with muleXslt with mule
Xslt with mule
 
Mule high availability
Mule high availabilityMule high availability
Mule high availability
 
Sap integration by mule esb
Sap integration by mule esbSap integration by mule esb
Sap integration by mule esb
 
Query in share point by mule
Query in share point by muleQuery in share point by mule
Query in share point by mule
 
Logging configuration in mule
Logging configuration in muleLogging configuration in mule
Logging configuration in mule
 
Rest security in mule
Rest security in muleRest security in mule
Rest security in mule
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
 
Mule flow complete
Mule flow completeMule flow complete
Mule flow complete
 
Retrieve microsoft data
Retrieve microsoft dataRetrieve microsoft data
Retrieve microsoft data
 

Similaire à Mule message

Similaire à Mule message (20)

Mule messages
Mule messagesMule messages
Mule messages
 
Mule architecture
Mule   architectureMule   architecture
Mule architecture
 
Mule architecture
Mule   architectureMule   architecture
Mule architecture
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentals
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Mule
MuleMule
Mule
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb
Mule esbMule esb
Mule esb
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestration
 
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
 
Mule esb and_relevant_components
Mule esb and_relevant_componentsMule esb and_relevant_components
Mule esb and_relevant_components
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor component
 
Mule esb presentation 2015
Mule esb presentation 2015Mule esb presentation 2015
Mule esb presentation 2015
 
Apache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache CamelApache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache Camel
 
Mule concepts flows
Mule concepts flowsMule concepts flows
Mule concepts flows
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
 
Mule esb kranthi
Mule esb kranthiMule esb kranthi
Mule esb kranthi
 
Mule esb kranthi
Mule esb kranthiMule esb kranthi
Mule esb kranthi
 

Plus de Son Nguyen

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introductionSon Nguyen
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with muleSon Nguyen
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overviewSon Nguyen
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filterSon Nguyen
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in muleSon Nguyen
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with muleSon Nguyen
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in muleSon Nguyen
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in muleSon Nguyen
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weaveSon Nguyen
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler muleSon Nguyen
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-boundSon Nguyen
 
Batch job processing
Batch job processingBatch job processing
Batch job processingSon Nguyen
 
Using message enricher
Using message enricherUsing message enricher
Using message enricherSon Nguyen
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with muleSon Nguyen
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connectionSon Nguyen
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in muleSon Nguyen
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoftSon Nguyen
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectorsSon Nguyen
 
Mule integration with cloud hub
Mule integration with cloud hubMule integration with cloud hub
Mule integration with cloud hubSon Nguyen
 

Plus de Son Nguyen (20)

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
 
Jms queue
Jms queueJms queue
Jms queue
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Mule integration with cloud hub
Mule integration with cloud hubMule integration with cloud hub
Mule integration with cloud hub
 

Dernier

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Dernier (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Mule message

  • 2. | ©2013, Cognizant 1 Mule Properties and FlowVariables are one of the most widely used features in Mule. Nevertheless, Mule newcomers may have a hard time understanding how the different property scopes and variables compare to each other, and how to choose the right one for their use cases.
  • 3. Messaging Framework  A message is simply a packet of data that can be handled and sent between applications on a specific channel (also called a queue).  Many applications don't have the ability to read or process data coming from another application.  Mule ESB solves this problem by providing a messaging framework that reads, transforms, and sends data as messages between applications. A Mule message is composed of different parts:  The payload, which is the main data content carried by the message.  The properties, which contain the meta information very much like the header of a SOAP envelope or the properties of a JMS message.  If required, a series of attachments that can accompany the message
  • 4. Mule vs. Traditional ESB  Difference between Mule and a traditional ESB is that Mule only converts data as needed.  Traditional ESB  Need to create an adapter for every application, connect to the bus and convert the application's data into a single common messaging format.  To develop adapter and process message require a lot of time.  Mule ESB  Mule eliminates all these efforts.  Mule increases performance and reduces development time over a traditional ESB.
  • 5. Messaging styles One-way  Receives a message and puts it on a SEDA queue.  The calling thread returns and the message is processed by the SEDA thread pool. Nothing gets returned from the result of the call.  The Mule service must have an asynchronous inbound endpoint.  If an error occurs it is handled by the Mule server.  One-Way return types are NullPayloads
  • 6. Messaging styles - contd Request – Response  Receives a message and the component returns a message.  If the component call returns null, then a Mule Message with a NullPayload is returned.  If the call method is void the request message is returned.  The Mule service must have a synchronous inbound endpoint and no outbound endpoint configured.
  • 7. Messaging styles - contd 6 Synchronous  A message is now processed synchronously if one of the following is true:  endpoint is request-response  A transaction is active  The message property MULE_FORCE_SYNC is set to TRUE  Receives a message and the component processes before sending it out on another endpoint. The request happens in the same thread.  Mule blocks on the outbound endpoint to wait for a response from the remote application (if applicable) until the responseTimeout threshold is reached. If no response is received, it returns null.  A synchronous call always returns a result, even if there is an outbound endpoint.
  • 8. 7 Messaging styles - contd Async Request Response  This pattern allows the back-end process to be forked to invoke other services and return a result based on the results of multiple service invocations.  The Async Reply Router is used to listen on a Reply To endpoint for results.  Set the reply-to address on the outbound router, and set the <async-reply> element to listen on that reply endpoint.
  • 9. Message scope Inbound  Inbound properties scope will hold the headers/properties sent by the caller flow/service/external source.  When a message arrives to a mule endpoint it can contain headers/properties. Those properties will be placed as inbound properties of the mule message.  Inbound message properties are read only.
  • 10. Outbound  Outbound properties scope will contain all the properties that will be deliver together with the message payload when calling an outbound endpoint.  When a message is deliver to another endpoint then all the properties in outbound scope will be sent together with the message as headers.  After calling an outbound endpoint that returns a response outbound properties are lost. Message scope - contd
  • 11. Message scope - contd  Invocation  An Invocation property will be present in the invoked flow and will last for all the flow execution.  Invocation properties are not propagated to other flows, but will be propagated if another flow or sub-flow is called using flow-ref.  Session  Mule session scope is created when a message enters a mule flow/service and it will preserved until the message leaves mule.  Mule session propagation is done only when mule endpoints transport supports message headers (i.e. JMS, HTTP, VM).  Any change to those properties within the async flow will not be reflected in the caller flow.  Application  Application properties scope is tied to the application lifecycle  Application properties are read only.
  • 12. Sample Code – Inbound Scope
  • 13. Sample Code – Outbound Scope
  • 14. Sample Code – Invocation Scope