SCATTER GATHER FLOW
IN MULE
 Note that, unlike All, Scatter-Gather executes routes
concurrently instead of sequentially. Parallel execution
of routes can greatly increase the efficiency of your
application and provides more information than
sequential processing. Refer to Migrating to Scatter-
Gather from the All Message Router below for more
information about the differences you can expect.
Scatter-Gather is an important component in Mule that sends a request message to multiple
targets concurrently. At the end it collects the responses from all routes, and aggregates them into a
single message.
Message
Processor
Message
Processor
Combined Payload
Processing concurrently
To implement scatter-gather in Mule lets consider the following flow:-
You can see that there is two flow reference after scatter-gather which means it will process 2
flows concurrently .
The other 2 sub flows are here:-
Now, You will see that these two flows will run concurrently and at the end the payloads from
both the flow will be merged .
Our Mule config will be as follow:-
Now, our flow is ready .. If we can test our flow using the url :-
http://localhost:8090/scattergather and we will get in logs as follows :-
You can see both the flow ended up concurrently and scatter-gather has merged
the payload fro both the flows at the end
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 
Scatter gather flow in mule

Scatter gather flow in mule

  • 1.
  • 2.
     Note that,unlike All, Scatter-Gather executes routes concurrently instead of sequentially. Parallel execution of routes can greatly increase the efficiency of your application and provides more information than sequential processing. Refer to Migrating to Scatter- Gather from the All Message Router below for more information about the differences you can expect.
  • 3.
    Scatter-Gather is animportant component in Mule that sends a request message to multiple targets concurrently. At the end it collects the responses from all routes, and aggregates them into a single message.
  • 4.
  • 6.
    To implement scatter-gatherin Mule lets consider the following flow:- You can see that there is two flow reference after scatter-gather which means it will process 2 flows concurrently .
  • 7.
    The other 2sub flows are here:- Now, You will see that these two flows will run concurrently and at the end the payloads from both the flow will be merged .
  • 8.
    Our Mule configwill be as follow:-
  • 9.
    Now, our flowis ready .. If we can test our flow using the url :- http://localhost:8090/scattergather and we will get in logs as follows :- You can see both the flow ended up concurrently and scatter-gather has merged the payload fro both the flows at the end
  • 10.
    In my nextslide 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 