The scatter gather pattern is ideal for requesting responses from multiple subsystem, then use aggregator to collect the responses and merge them into a single response message.
the scatter gather pattern is a composite pattern that illustrates how to broadcast a message to multiple recipients and re aggregate the responses back into a single message.
example, in the context of order processing. each order item that is not currently in stock could be supplied by one of multiple external suppliers. However, the suppliers may or may not have the respective item in stock; they may charge a different price and may be able to supply the part by a different date. to fill the order in the best way possible, quotes are requested from all suppliers and then a decision is made as to which one provides the best term for the requested item.
Top comments (0)