4 Replies Latest reply on May 10, 2012 1:30 AM by noelo

    Scatter-Gather pattern  / Broadcast Aggregate  implementation.

    fenoloco

      Im trying to implements this pattern http://www.eaipatterns.com/BroadcastAggregate.html

      I have a gateway to recibe the request and then I wanna broadCast some equivalents service and give the first response I recived.

       

      I try to change the ReplyTo, use aggregator but I cant achive this, can anyone tell me the way to implement something like this?

       

       

      Thanks.

        • 1. Re: Scatter-Gather pattern  / Broadcast Aggregate  implementation.
          noelo

          You could try the following:

          From the gateway service use the syncserviceinvoker to call a one way  invm service to put the message onto a topic, using the jms router, on which all recipient ESB services are subscribed to. Send the message as wrapped as it will pass along the reply address of the syncserviceinvoker.

          The recipient services should be request-reply and when they return they should reply back to the syncserviceinvoker.

           

          I haven't tried this and there may be issues with multiple replys going back to the one invoker but give it a go.

           

          regards

          Noel

          1 of 1 people found this helpful
          • 2. Re: Scatter-Gather pattern  / Broadcast Aggregate  implementation.
            fenoloco

            Hi Noel , thanks for your response.

             

            I try to make a gateway and call a service(OneWay and InVM global scope) I call it with service.deliverSync(mess,timeout).

            In this service I wanna call the registered Services with service.deliveryAsync how can I wrapped the message to pass along the reply address of the syncServiceInvoker inside de gateway?

            I need to process the response before send it back to the remote requester.

             

            Thanks again.

            • 3. Re: Scatter-Gather pattern  / Broadcast Aggregate  implementation.
              fenoloco

              One more clarification , the recipients service are determined dynamically so that I cant use a jms router.

              • 4. Re: Scatter-Gather pattern  / Broadcast Aggregate  implementation.
                noelo

                The jmsrouter has an unwrapped flag which sends on the full message to the topic. As for dynamically selecting the service you could possibly use a topic selector on the downstream services to only take requests that they are interested in.