# Scatter-Gather parallel routes and results

*MuleSoft Developer Study Guide · Routing Events · Last updated October 28, 2026 · https://www.certifyforce.com/study-guide/mulesoft-developer/routing-events/scatter-gather-parallel-routes-and-results*

Predict the payload and variables after a Scatter-Gather router, read a route's result by its index, and know what `MULE:COMPOSITE_ROUTING`, `timeout` and `maxConcurrency` do when a route fails or runs long.

- Certification: Salesforce MuleSoft Developer
- Exam section: Routing Events
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-developer

**Official exam objective:**

> Apply correct processors/syntax to scatter and gather messages, and predict outcomes.

## What the exam expects

- Choose Scatter-Gather to call several services at once and combine their responses.
- Read one route's payload from the aggregated result, which is keyed by route index starting at `0`.
- Predict the variables after the router.
- Predict what happens when a route fails, and handle it with a Try scope in the route or with the `MULE:COMPOSITE_ROUTING` error's `results`.
- Configure `timeout`, `maxConcurrency`, `target` and `targetValue`, and know that the router needs at least two routes.

Key terms:
- **Route**: one `<route>`, run on its own thread.
- **Route index**: the route's XML position from `0`, the key in the result.
- **`MULE:COMPOSITE_ROUTING`**: thrown after all routes finish if any failed.
- **`maxConcurrency`**: the maximum number of routes processed at once.

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Minimum routes | At least two, or the app throws an exception and doesn't start | [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept) |
| Output format | `{0: messageFromRoute0, 1: messageFromRoute1, …}` | [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept) |
| Variable set by one route | Keeps that route's value | [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept) |
| Variable set by several routes | Becomes a list of those routes' values | [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept) |
| Any route fails | All routes finish, then `MULE:COMPOSITE_ROUTING`; nothing after the router runs | [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept) |
| Composite error contents | `results` and `failures` keyed `'0'`, `'1'`…; plus `error.childErrors` | [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept) |
| `timeout` | Milliseconds; 0 or less means no timeout; overrun is `MULE:TIMEOUT` | [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept) |
| `maxConcurrency` | Default all routes in parallel; `1` runs them sequentially | [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept) |
| `targetValue` | Defaults to `#[payload]`; cannot use the `vars` keyword | [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept) |

## Check yourself

- When does a route that has a Try scope still make the router throw `MULE:COMPOSITE_ROUTING`?
- What does `error.errorMessage.payload.failures['0']` return when the first route completed successfully?
- Which keywords can `targetValue` use?
- Why is an Async scope the wrong tool for combining several services' answers?

## Sources

- [Scatter-Gather Router](https://docs.mulesoft.com/mule-runtime/latest/scatter-gather-concept)
- [Parallel For Each Scope](https://docs.mulesoft.com/mule-runtime/latest/parallel-foreach-scope)
- [Async Scope](https://docs.mulesoft.com/mule-runtime/latest/async-scope-reference)
- [First Successful Router](https://docs.mulesoft.com/mule-runtime/latest/first-successful)
- [Choice Router](https://docs.mulesoft.com/mule-runtime/latest/choice-router-concept)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 8 linked practice questions, and unlimited timed mock exams are included with the MuleSoft Developer pack (USD $19): https://www.certifyforce.com/practice-exams
