The prime functionality of the Batch scope is to process and synchronize a large number of records with ease, which makes it one of the most popular and widely used components.
Mule’s batch processing strategy divides a large number of records into individual records and processes them asynchronously. By default, Mule’s Batch scope processes 100 records per batch, which utilizes 16 threads – however, this is configurable.
Features of the Batch scope
A few prime features of the batch processing strategy are listed here:
- The capability to process large records and files with less processing time
- The parallel processing of records helps us achieve near real-time transformation
- It has its own error-handling section
- It helps us to reprocess the failed records and hence, achieve the maximum throughput
Now, we shall learn about the batch processing stages in the next section.
The batch processing stages
The batch processing strategy is executed in three stages, namely the following:
- Load and Dispatch: This is an initial and implicit stage in batch processing. It is responsible for creating batch job instances, converting a payload into a collection of records, and splitting the collection into individual records for processing.
- Process: This is a mandatory phase in batch processing wherein all records are processed asynchronously based on the number of threads and the batch size.
- On Complete: This is the last phase of batch processing. It is also a mandatory or default phase. It summarizes the execution of batch processing and makes reports available for statistics.
Comments
Post a Comment
Please Write your comment here.