Salesforce Certified MuleSoft Platform Integration Architect free question 5 / 10 · Domain 4: Designing and developing Mule applications
A flow must call a pricing service and a stock service for the same order. The calls are independent, and the flow needs the answers of both services. Which core router fits?
- The First Successful router, which runs routes until one of them succeeds
- The Scatter-Gather router, which runs the routes in parallel and combines the events
- The Round Robin router, which runs one route per execution and alternates the routes
- The Choice router, which runs the route of the first expression that is true
Show the answer and explanation
Answer: B
Why this is correct
The Scatter-Gather component is a routing event processor that processes a Mule event through different parallel routes. Each route gets a reference to the event, runs in a separate thread, and executes its processors. The component then combines the events returned by the routes into a new Mule event. The page states that it executes each route in parallel, not sequentially, which can greatly increase efficiency. Choice, First Successful and Round Robin each run a single route.
Why the other options are wrong
"The Choice router, which runs the route of the first expression that is true" … The Choice router executes one route only, so one service would be skipped.
"The First Successful router, which runs routes until one of them succeeds" … First Successful stops after one successful route. It does not collect results from several.
"The Round Robin router, which runs one route per execution and alternates the routes" … Round Robin executes only one route each time the flow runs.
Key points
Use Scatter-Gather for independent calls whose results are combined.