Dec 1st, 2011, 02:29 AM
Aggregator Vs Resequencer...!!
I am using aggregator in my application where I aggregate the messages to a group of 1000 messages and the moment messages group reaches to 1000 messages then at that time aggrregator releases that message group and I have also maintained a message reaper for time process ..suppose if a group of 1000 messages doesn't get created in a particular time then the reaper will expire the message group and releases them.
The thing that I am achieving from the above process is that I have to write all the messages in the queue to a file and that is perfectly I am achieving using an aggrregator.
Now my Query is that Can I also use resequencer instead of aggregator since technically reseuencer is similar to aggregator except few parameters..!! will using resequencer would have improve the performance..??
also I was studying both agregator and resequencer classes I found most of the parameters were same..!!
Last edited by SARAL SAXENA; Dec 1st, 2011 at 11:03 AM.
Dec 3rd, 2011, 10:36 AM
Please advise me on that as I am stuck up on this ..!!
Dec 3rd, 2011, 12:45 PM
Though both are types of correlating message handlers, both these patterns are used for totally different purposes.
What is your opinion? Do you think you can use Resequencer instead of Aggregator? Are you able to achieve what you intend to do with a resequencer instead of aggregator?
Dec 4th, 2011, 10:53 AM
Dec 4th, 2011, 11:57 AM
As i said before, both are used with a different intent and since you must have gone through the link you shared, it would have been even more clear to you.
You intend to group together 1000 messages and then release them, however resequencer will release the messages as soon as it finds a particular sequence to be complete in a group starting with the first message in the sub sequence to be releaed. In your case if you get 1000 messages all in order they would be released immediately as soon as the message arrives the resequencer.
So your intent of releasing the messages in a group of 1000 cannot be always achieved.
Does that make sense?
Dec 6th, 2011, 11:27 PM
Dec 7th, 2011, 12:26 AM
To start of with my name is Amol and not Anmol (we have discussed this previously)
Performance is secondary here, my question is primarily are you able to achieve what you intent to, with a resequencer rather than an aggregator ?(difference in behavior is given above and both are used for a different purpose altogether )
Even if it does, I personally feel, you will have no performance improvement by switching between them. IO operations are the major bottleneck and would consume majority of your time.