2. Mule ESB has the ability to split a long and big message into small parts.
It can be done by Mule Splitter .
The Splitter Flow Control splits a message into separate fragments, then sends
these fragments one at a time to the next message processor in the flow.
So, ultimately Splitter a breaks a huge and large message into small part and that
small part can be handled individually
3.
4. Let us consider we have following XML data as input:-
<AllProduct>
<productsList>
<product>
<productid>1</productid>
<productname>car</productname>
<productDesc>accessioes</productDesc>
</product>
<product>
<productid>2</productid>
<productname>watch</productname>
<productDesc>accessioes</productDesc>
</product>
<product>
<productid>3</productid>
<productname>Bike</productname>
<productDesc>accessioes</productDesc>
</product>
</productsList>
</AllProduct>
5. Now, we want to Split this XML into smaller part and log all the productid and
productname
So, in this case we will be splitting the xml and log all the productid and
productname in console
6. So, you can see we have used Mule Splitter component to split the input XMl
7. The Mule config will be :-
Please note, we are using XPATH 3 to retrieve the value of nodes here.
To know more about XPATH 3 please visit :-
http://www.mulesoft.org/documentation/display/current/XPath
8. So, if we test the example and post the input XML as following in the url
http://localhost:8085/test in a REST client :-
9. And we will get all the values of productid and productname in the logger along with
the total node count :-
10. So, here you can see how to use a Mule splitter and split the large payload into
smaller independent value. It’s pretty simple and effective in handling larges set of
data
11. In my next slide I will bring some other techniques in Mule implementation .
Hope you have enjoyed this simpler version.
Keep sharing your knowledge and let our Mule community grow