Announcement Announcement Module
Collapse
No announcement yet.
Aggregator Vs Resequencer...!! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aggregator Vs Resequencer...!!

    Hi ,

    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, 11:03 AM.

  • #2
    Hi Guys,
    Please advise me on that as I am stuck up on this ..!!

    Comment


    • #3
      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?

      Comment


      • #4
        Originally posted by Amol Nayak View Post
        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?
        Hi Anmol,
        Yeah I know both are technically different...for Aggregator please check this url http://www.eaipatterns.com/Aggregator.html and for Resequencer please check this url http://www.eaipatterns.com/Resequencer.html

        when I was exploring the Resequencerr api ,I found that many constructors arguement are similar to of agrregator,IN my application I was recievieng messages from a queue thru message driven listener and then I make a group of 1000 messages and wait for certain period of time and then releases those 1000 messages , this I am achievieng through aggregator , My query is that if resequencer contain all the same parameters in its api can this task be also involve through resequencer also...?

        what I was planning to make group of 1000 messages onsome sequence and then release them..??
        Last edited by SARAL SAXENA; Dec 4th, 2011, 11:03 AM.

        Comment


        • #5
          Hi Saral,
          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?

          Comment


          • #6
            Originally posted by Amol Nayak View Post
            Hi Saral,
            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?

            Hi Anmol,
            What I want to achieve is that this process of releasing the messages and writing to file is achieved as soon as possible so that best throughput can be achieved..!!

            Comment


            • #7
              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.

              Comment

              Working...
              X