Mule ESB - Intra application communication
-
Upload
krishananth -
Category
Technology
-
view
175 -
download
3
Transcript of Mule ESB - Intra application communication
![Page 2: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/2.jpg)
ObjectiveHow different Mule ESB applications
communicate with each other?What are the advantages?
![Page 3: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/3.jpg)
Pre-requisitesAnypoint Studio – January 2015 and laterMule ESB Runtime – 3.6.0 and aboveKnowledge on shared domainsKnowledge on VM connectorsKnowledge on Mule ESB Functional test case
suite
![Page 4: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/4.jpg)
Intra communication optionsUsing Http/SOAP (non performant due to
serialization)Using Http/REST (non performant due to
serialization)Using VM Connector – (performant - High 5 )
![Page 5: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/5.jpg)
ProcessCreate a shared domainCreate a shared VM connectorCreate a receiverCreate a sender (provider)Integrate all
![Page 6: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/6.jpg)
Step 1 – Create a shared domainCreate a shared domain project in StudioIn studio, go to File New Shared domain
projectSelect runtime Mule ESB 3.6.1 and click
Finish
![Page 7: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/7.jpg)
Step 1- Create a shared domain
![Page 8: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/8.jpg)
Step 2 – Define shared VM Connector In the shared domain project, create a new shared VM connector (make
sure you import correct schemas – see mule-domain-config.xml below)
<?xml version="1.0" encoding="UTF-8"?><domain:mule-domain xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:domain="http://www.mulesoft.org/schema/mule/ee/domain" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xsi:schemaLocation=" http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd http://www.mulesoft.org/schema/mule/ee/domain http://www.mulesoft.org/schema/mule/ee/domain/current/mule-domain-ee.xsd"> <!-- configure here resource to be shared within the domain --> <vm:connector name="my_shared_vm_connector" validateConnections="true" doc:name="VM"/>
</domain:mule-domain>
![Page 9: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/9.jpg)
Step 3 – Create Receiver ApplicationCreate a new Mule ESB application called
ReceiverApplication (child application)Create a flow which has VM Inbound
endpoint. Name the endpoint path as VM_INBOUND
Modify /src/main/app/mule-deploy.properties to refer to my-shared-domain
The connectors in domain are now available for your ReceiverApplication
![Page 10: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/10.jpg)
Step 3 - Image
![Page 11: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/11.jpg)
Step 4Create a Provider/Sender Mule ESB
applicationUpdate /src/main/app/deploy.properties touse
my-shared-domain.propertiesCreate a flow having VM Outbound endpointName the endpoint path as VM_INBOUNDRefer VM Outbound endpoint to use shared
connector (my-shared-vm-connector)
![Page 12: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/12.jpg)
Step 4 - Image
![Page 13: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/13.jpg)
Step 5 – Integrate allStart the Provider Application in StudioThe my-shared-domain, Provider application
and the Receiver application are started in Studio
![Page 14: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/14.jpg)
Step 5 - Image
![Page 15: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/15.jpg)
Step 6 - TestTest the application by opening the browser
to Http endpoint for provider applicationThe “Say Hello” payload is set from Provider
and is passed to Receiver using VM (intra memory communication)
![Page 16: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/16.jpg)
Step 6 – Image
![Page 17: Mule ESB - Intra application communication](https://reader036.fdocuments.in/reader036/viewer/2022082216/55b81e81bb61eb53488b4573/html5/thumbnails/17.jpg)
MiscellaneousShared VM connector works only in EE
editionIs fastest when compared to webservice or
REST based intra communication callsRequire shared domain to define a shared VM
connector