The views expressed on this blog are my own and do not necessarily reflect the views of any Organisations owning these products.I keep on doing R & D with different products in and around Middle ware stack and these posts are result of that.Most of the post are result of my own experiments or ideas taken from other blogs .If in any case You feel content is not right you can comment to remove that post. This blog uses the default features,cookies of blogspot.com
Monday, December 27, 2010
Debatching in SOA suite 11g
Debatching is a feature where in you break a large input data in to a number of small inputs,this is generally done in order to reduce load on the server.
This will be very clear with the following example
Let suppose i have an input file with following data in a text file
called input.txt
ram,123,ibm
Shyam,234,cisco
Pasha,345,CTS
Kallol,456,TCS
As you can see it is a comma separated value.
We have a file adapter which will be polling for the record.
But assume that due to perfromance issue we want that the record
should be processed two at a time that is i want that first only
ram,123,ibm
Shyam,234,cisco
should be processed and then
Pasha,345,CTS
Kallol,456,TCS
should be processed in second stretch,however i dont want to intiate the process again.In this scenario i will use the debatcing feature of SOA Suite 11g.
This will process a single record twice using two records at a time thus will create two instance for the record.
We will see how we can achieve this target in SOA Suite.
My process will look something like this,
where in i am polling the same record which i have taken as example here
then finally in am just writing this to another file location.So its just a simple file inobund outbound scenario.
Now the only setting that you need to understand in debatching is in file filtering page as shown below
AS you can see we have selected the option
Files contain Multiple Messages PublishMessages in Batches of
and then i have chosen value as "2"
which means i want my data to be processed in a batch of "2"
Now if you will go to the code level .jca file for this
you will find that following property has been added for this
property name="PublishSize" value="2"
So now our requirement is fulfilled.
Now you can download my project ,change the location of input and output as per your server location and check the process with the same input as i have metioned here.
Two instance will be created and two output files will be generated for it.
1 comment:
Spot on with this write-up, I really feel this amazing site needs
a great deal more attention. I'll probably be returning to read more,
thanks for the advice!
Post a Comment