sends
the same message to multiple message processors or multiple end points.
The routing message
processor Scatter-Gather sends a request
message to multiple targets concurrently. It collects the responses from all
routes, and aggregates them into a single message, All payloads are combined to
gather.
This follow Aggregator strategy && Multicast pattern
The Scatter-Gather
router sends a message for concurrent processing to all configured routes. The
thread executing the flow that owns the router waits until all routes complete
or time out.
If
there are no failures, Mule aggregates the results from each of the routes into
a message collection (MessageCollection class). Failure in one route does not
stop the Scatter-Gather from sending messages to its other configured routes,
so it is possible that many, or all routes may fail concurrently.
By default, if any route fails, Scatter-Gather performs the following
actions:
·
sets the exception payload accordingly for
each route
·
throws a CompositeRoutingException, which
maps each exception to its corresponding route using a sequential route ID.
By default, if any route
fails, Scatter-Gather performs the following actions: sets the exception
payload accordingly for each route throws a CompositeRoutingException, which maps each exception to its
corresponding route using a sequential route
ID Catching the CompositeRoutingException allows you to gather
information on all failed routes.