# Batch jobs and parallel processing at scale

*MuleSoft Platform Integration Architect Study Guide · Designing integration solutions to meet performance requirements · Last updated November 13, 2026 · https://www.certifyforce.com/study-guide/mulesoft-platform-integration-architect/designing-integration-solutions-to-meet-performance-requirements/batch-jobs-and-parallel-processing-at-scale*

How to process large collections and record sets in Mule 4: For Each versus Parallel For Each (concurrency, errors, memory), and Batch Job tuning with block size, maxConcurrency on fractional cores, Batch Aggregator sizing, scheduling strategies for concurrent instances, the disk-bound record queue and job history.

- Certification: Salesforce MuleSoft Platform Integration Architect
- Exam section: Designing integration solutions to meet performance requirements
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-platform-integration-architect

**Official exam objective:**

> Design Mule applications to process large sequences/streams of messages.

## What the exam expects

- Choose between For Each, Parallel For Each and a Batch Job for a large collection, and predict each one's error and memory behavior.
- Cap parallelism to a downstream limit with the right component's `maxConcurrency`.
- Tune a Batch Job's block size and concurrency for record size, memory and fractional-core deployments.
- Size a Batch Aggregator for bulk operations and pick a scheduling strategy for concurrent job instances.
- Explain why disk I/O dominates batch performance.

**Parallel For Each:** a scope that splits a collection into parts processed simultaneously in separate routes, then aggregates the results in their original order. **Batch Job:** a component that splits a message into records, processes them in steps and reports the results. **blockSize:** the number of records per block moved into memory for processing. **Batch Aggregator:** an optional Batch Step component that acts on arrays of records. **schedulingStrategy:** how several ready batch job instances share threads ([Parallel For Each Scope](https://docs.mulesoft.com/mule-runtime/latest/parallel-foreach-scope), [Batch Job Performance Tuning](https://docs.mulesoft.com/mule-runtime/latest/tuning-batch-processing), [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference)).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Parallel For Each `maxConcurrency` | Default: all routes in parallel | [Parallel For Each Scope](https://docs.mulesoft.com/mule-runtime/latest/parallel-foreach-scope) |
| Parallel For Each failure | All routes finish, then `MULE:COMPOSITE_ROUTING` | [Parallel For Each Scope](https://docs.mulesoft.com/mule-runtime/latest/parallel-foreach-scope) |
| For Each `batchSize` | Default 1; sub-collections still sequential | [For Each Scope](https://docs.mulesoft.com/mule-runtime/latest/for-each-scope-concept) |
| Batch input phase | In-disk record queue, constantly read and written | [Batch Job Performance Tuning](https://docs.mulesoft.com/mule-runtime/latest/tuning-batch-processing) |
| Batch `blockSize` | Default 100 | [Batch Job Performance Tuning](https://docs.mulesoft.com/mule-runtime/latest/tuning-batch-processing) |
| Batch `maxConcurrency` | 2 x JVM-detected cores; whole cores on fractional deployments | [Batch Job Performance Tuning](https://docs.mulesoft.com/mule-runtime/latest/tuning-batch-processing) |
| Default scheduling strategy | `ORDERED_SEQUENTIAL` | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |
| Batch Aggregator settings | `size` or `streaming`, never both; no default | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |
| Streaming aggregator | Array held in RAM; often restricted by SaaS providers | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |
| Batch job history | Kept 7 days by default | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |

## Check yourself

- When does a size-based Batch Aggregator start processing an array of records?
- Why should a Batch Aggregator avoid Guava types such as `ImmutableMap`?
- How many records are in the last block when 1,010 records run with a block size of 100?

## Sources

- [Batch Job Performance Tuning](https://docs.mulesoft.com/mule-runtime/latest/tuning-batch-processing)
- [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference)
- [Parallel For Each Scope](https://docs.mulesoft.com/mule-runtime/latest/parallel-foreach-scope)
- [For Each Scope](https://docs.mulesoft.com/mule-runtime/latest/for-each-scope-concept)
- [Back-Pressure and MaxConcurrency](https://docs.mulesoft.com/mule-runtime/latest/tuning-backpressure-maxconcurrency)

## About the full unit

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