Scatter Gather is a Routing Event Processor that receives a Mule event and sends a reference of this Mule event to each processing route.
Each request coming to Mule will be scattered across the routers to execute in parallel. Parallel processing starts and each router receives same set of payload.
Creates a new Mule event that combines all resulting Mule events from each route and passes the consolidated event to the next event processor , only after every route completes successfully.
It sends a request message to multiple targets concurrently. It then collects the responses from all routes and aggregates them back into a single response.
The Scatter-Gather component executes each route in parallel so greatly increase the efficiency of your Mule application
It may provide more information than sequential processing.
The Scatter-Gather component works with repeatable streams.
If used within transaction, it behaves as sequential because of BLOCKING_IO thread.
It is one of the Performant Integration Solutions in parallel processing.
Scatter Gather – Advanced
Scatter-Gather component should have at least two routes; otherwise, Mule application throws an exception and does not start.
It uses CPU_LITE (100% non BLOCKING) execution type reactive stream to optimize performance.
If “Max Concurrency” for scatter gather component is set to 1, then events across the routes will be executed sequentially.
It waits for the thread to be free and then executes the next route.
In case when target variable is set, the mule event will be stored in it as variable. (here Example: 4 routes)
When Scatter Gather component is part of transaction, it becomes sequential with BLOCKING execution type.
In case of failure of any one route, all the routes processing do not go to the next event processor but comes to scatter gather connector itself for exit.
On-error propagate or On error continue can be used as required in such cases.