Scatter Gather Flow in Mule 4
Nandinee Ramanathan
1 min read
What is scatter gather ?
The
Scatter-Gather
component can send messages to all the routes concurrently.This means that when a route is being processed the remaining routes must have to wait for its completion.
Each route executes in its own thread and thus, if an exception occurs, it does not prevent the execution of other routes that execute in their own threads. So, the final result may contain responses from the successful routes as well as from the failed ones.
Example:
- Create a new mule project and use scatter-gather from Mule Palatte.
Use scatter-gather in the flow and route to two different routes. Both of them are executed in concurrently.
The combined payoad is in java format it needs to be converteed to JSON.
0
Subscribe to my newsletter
Read articles from Nandinee Ramanathan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by