This section explains, through an example scenario, how the Scatter-Gather EIP can be implemented using WSO2 ESB. The following topics are covered:
Table of Contents |
---|
...
Start the ESB server and log into its management console UI (https:
//localhost:9443/carbon
). In the management console, navigate to Main Menu, click Services, then -> Services -> Add and then click Proxy Service. Next, copy and paste the following configuration, which helps you explore the example scenario, to a new Pass Through Proxy Service named ScatterGatherProxy. Anchor step3 step3
...
Simulating the sample scenario
Use a SOAP client like SoapUI to send the following request to the
ScatterGatherProxy
service.Code Block language html/xml <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.samples"> <soapenv:Header/> <soapenv:Body> <ser:getSimpleQuote> <ser:symbol>foo</ser:symbol> </ser:getSimpleQuote> </soapenv:Body> </soapenv:Envelope>
- Because the log mediator is enabled inside the outSequence, there will be three responses from the three vendors. The logs will be similar to the following:
- In SoapUI, you will get the response from the vendor providing the best quote as follows:
- Compare the logged response messages with the response received by the client to see that the
ScatterGatherProxy
service returns the best quote to the client.
How the implementation works
...