Routing Events8% of the exam
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.
Apply correct processors/syntax to scatter and gather messages, and predict outcomes.
~7 min read · 8 practice questions ·
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_ROUTINGerror'sresults. - Configure
timeout,maxConcurrency,targetandtargetValue, 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
Minimum routes
- Detail
- At least two, or the app throws an exception and doesn't start
Output format
- Detail
{0: messageFromRoute0, 1: messageFromRoute1, …}
Variable set by one route
- Detail
- Keeps that route's value
Variable set by several routes
- Detail
- Becomes a list of those routes' values
Any route fails
- Detail
- All routes finish, then
MULE:COMPOSITE_ROUTING; nothing after the router runs
Composite error contents
- Detail
resultsandfailureskeyed'0','1'…; pluserror.childErrors
timeout- Detail
- Milliseconds; 0 or less means no timeout; overrun is
MULE:TIMEOUT
maxConcurrency- Detail
- Default all routes in parallel;
1runs them sequentially
targetValue- Detail
- Defaults to
#[payload]; cannot use thevarskeyword
Sources for this section (1)
- 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
targetValueuse? - Why is an Async scope the wrong tool for combining several services' answers?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the MuleSoft Developer pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 40 lessons of the MuleSoft Developer guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Practice exams purchase adds inline bank questions and topic practice (8 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams