SlideShare a Scribd company logo
By Anirban Sen Chowdhary
Mule ESB has the ability to process messages in batches.
Within an application, we can initiate a batch job which is basically a block of code
that splits a large messages into individual records, then performs actions upon
each record, then reports on the results and potentially pushes the processed
output to other systems or queues.
This functionality is particularly useful when working with a large set of data for
example Database where a large set of Data is required to retrieve or insert in a
bulk.
Source:- MuleSoft
A batch job is a top-level element in Mule which exists outside all Mule flows.
Generally a batch jobs split a large messages into small parts which is called
records and which Mule processes asynchronously in a batch job; similarly just as
flows process messages, batch jobs process records.
A batch job contains one or more batch steps which, in turn, can contain any
number of message processors or Mule component that act upon records as they
move through the batch job.
A batch job executes when triggered by either a batch executor in a Mule flow or
a message source in a batch-accepting input which is when triggered, will create a
new batch job instance.
After all record are processed and passed though all the batch steps, the batch job
instances is ended and result of all the batch jobs are accumulated and summarised
in a report that reflect which batch job as succeed and which job has failed at the
time of processing. Source:- MuleSoft
Structure of batch job in Mule Config :-
<batch:job name="myBatchJobSteps">
<batch:process-records>
<batch:step name="Step1"/>
<batch:step name="Step2"/>
<batch:step name="Step3"/>
<batch:step name="Step4"/>
…………………….
</batch:process-records>
</batch:job>
The batch processing is useful in particular scenario :-
• When a large message fails, for example a database insertion in bulk, we can
continue with the rest.
• When integrating a data sets, that may be small or large, streaming or not, to
parallel process records.
• When it require to handle a large quantities of incoming data from an API into
a legacy system.
• Synchronising data sets between various business applications. Example
Netsuite and Salesforce
Source:- MuleSoft
There are basically 4 parts in Mule batch Job:-
Input phase: In Input phase, we can place a one-way message source and/or
message processors to prepare the data that is actually going to be fed into the
job. Here we are processing synchronously at a message level and this is an
optional phase.
Loading phase: This phase is automatic and implicit and we don’t have to do
anything here. In this phase payload from Input phase are split into records and
stored in persistent queues.
Process phase: In this phase, each records is processed separately and
independently and after that it is moved across the steps in an asynchronous and
paralleled fashion.
On Complete phase: In this phase you get a result object that tells you how many
records were processed, how many succeeded, which ones failed (and in which
step), etc. This is useful for generating reports and sending out notifications
Source:- MuleSoft
Mule batch job
Let’s consider we have a simple Mule flow as following:-
Here , we can see there are 3 phases :- In Input phase it is retrieving the data from
databases at a fixed interval of time
In Process phase it is executing 3 steps .. In step 1, it is inserting data into database.. In
step 2 it is logging messages if any and in step 3, it is logging failed messages if any.
In complete phase it log the Number of failed Records , Number of successful Records
and Elapsed Time
So, our Mule config will be as following:-
So, if we run our flow, we will see the following in log :-
Here you can see the Number of failed Records , Number of successful Records
and Elapsed Time in the log
So, here you can see how to use a Mule batch module. It’s pretty simple and
effective in handling larges set of data 
In my next slide I will bring some other techniques in Mule implementation .
Hope you have enjoyed this simpler version.
Keep sharing your knowledge and let our Mule community grow 
Mule batch job

More Related Content

PPTX
Dip(dependency inversion principle) presentation
PDF
Test link jira soap integration
PDF
Bamboo - an introduction
PDF
Git e GitHub
PDF
Dealing with Merge Conflicts in Git
PDF
7 rcm diagramas de flujo
PPTX
Github in Action
PPTX
Java Unit Testing
Dip(dependency inversion principle) presentation
Test link jira soap integration
Bamboo - an introduction
Git e GitHub
Dealing with Merge Conflicts in Git
7 rcm diagramas de flujo
Github in Action
Java Unit Testing

What's hot (13)

PPT
End to end testing - strategies
PDF
4Sem VTU-HDL Programming Notes-Unit2-Data Flow Descriptions
PDF
Git & GitHub for Beginners
PDF
Introduction to Github Actions
PDF
API Gateway report
PPTX
API Testing Presentations.pptx
PDF
válvulas y bombas hidráulicas
PDF
Understanding Branching and Merging in Git
PDF
How to Build a Custom Plugin in Rundeck
PPTX
Basic Git Intro
PDF
GitHub Actions in action
PPTX
Bombas de Paletas
PDF
GraalVM Overview Compact version
End to end testing - strategies
4Sem VTU-HDL Programming Notes-Unit2-Data Flow Descriptions
Git & GitHub for Beginners
Introduction to Github Actions
API Gateway report
API Testing Presentations.pptx
válvulas y bombas hidráulicas
Understanding Branching and Merging in Git
How to Build a Custom Plugin in Rundeck
Basic Git Intro
GitHub Actions in action
Bombas de Paletas
GraalVM Overview Compact version
Ad

Viewers also liked (20)

PPTX
Mule batch processing
PPTX
Mule properties
PPTX
Mule Esb Data Weave
PPTX
Splitting with mule
PPTX
Dataweave 160103180124
PPTX
Mule with composite source
PPTX
Filter expression in mule demo
PPTX
Mule esb How to convert from Object to Json in 5 minutes
PPT
Simple Poll in Mule
ODP
Cloudhub deployment
ODP
Cloudhub – architecture
PPT
Mule batch processing
PPTX
Creating dynamic json
PPTX
Deploying and running in mule standalone
PPTX
Scatter gather in mule
PPTX
Splitting with mule part2
PPTX
Json to json transformation in mule
PPTX
Mapping and listing with mule
PPTX
Mule with velocity
PPTX
Spring Boot Update
Mule batch processing
Mule properties
Mule Esb Data Weave
Splitting with mule
Dataweave 160103180124
Mule with composite source
Filter expression in mule demo
Mule esb How to convert from Object to Json in 5 minutes
Simple Poll in Mule
Cloudhub deployment
Cloudhub – architecture
Mule batch processing
Creating dynamic json
Deploying and running in mule standalone
Scatter gather in mule
Splitting with mule part2
Json to json transformation in mule
Mapping and listing with mule
Mule with velocity
Spring Boot Update
Ad

Similar to Mule batch job (20)

PPTX
Runing batch job in mule
PPT
Batch processing
PPT
Batch processing
PPT
Batch processing
PPT
Batch job processing
PPT
Mule batch processing
PPT
Mule batch processing
PPT
Mule batch processing
PPT
Mule batch processing
PPT
Batch processing
PPT
Mule batch processing
PPT
Mule batch processing
PPT
Mule esb batch
PPT
Mule batch processing
PPT
Mule Esb Batch process
PPTX
Batch processing
PPTX
Mulesoft anypoint batch processing
PPT
Mule batch processing
PPTX
Mule concepts
PPTX
Mule batch processing
Runing batch job in mule
Batch processing
Batch processing
Batch processing
Batch job processing
Mule batch processing
Mule batch processing
Mule batch processing
Mule batch processing
Batch processing
Mule batch processing
Mule batch processing
Mule esb batch
Mule batch processing
Mule Esb Batch process
Batch processing
Mulesoft anypoint batch processing
Mule batch processing
Mule concepts
Mule batch processing

More from Anirban Sen Chowdhary (20)

PPTX
Change the game with Game changer
PPTX
Ring central desktop app overview
PPTX
Overview in ringcentral digital line
PPTX
Some basics with ring central
PPTX
Ring central and python
PPTX
RingCentral application development overview
PPTX
Cloze connect ringcentral
PPTX
Overview on ring central errors part 4
PPTX
Setting up your ring central sandbox in steps
PPTX
Overview on ring central errors: part 2
PPTX
Overview on ring central errors
PPTX
Call recording overview ring central
PPTX
Ring central engaging with amazon alexa
PPTX
How ring central sdk changing the game
PPTX
When ring central connect salesforce
PPTX
Mule 4 connecting ring central
PPTX
Ring central sdk
PPTX
Ring central with okta
PPTX
Ring central connecting salesforce overview
PPTX
Ring central call logs overview (part 2)
Change the game with Game changer
Ring central desktop app overview
Overview in ringcentral digital line
Some basics with ring central
Ring central and python
RingCentral application development overview
Cloze connect ringcentral
Overview on ring central errors part 4
Setting up your ring central sandbox in steps
Overview on ring central errors: part 2
Overview on ring central errors
Call recording overview ring central
Ring central engaging with amazon alexa
How ring central sdk changing the game
When ring central connect salesforce
Mule 4 connecting ring central
Ring central sdk
Ring central with okta
Ring central connecting salesforce overview
Ring central call logs overview (part 2)

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Machine Learning_overview_presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Empathic Computing: Creating Shared Understanding
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Tartificialntelligence_presentation.pptx
Network Security Unit 5.pdf for BCA BBA.
SOPHOS-XG Firewall Administrator PPT.pptx
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
Group 1 Presentation -Planning and Decision Making .pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectroscopy.pptx food analysis technology
Machine Learning_overview_presentation.pptx
NewMind AI Weekly Chronicles - August'25-Week II
The Rise and Fall of 3GPP – Time for a Sabbatical?
A comparative analysis of optical character recognition models for extracting...
Electronic commerce courselecture one. Pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)
Mobile App Security Testing_ A Comprehensive Guide.pdf
Empathic Computing: Creating Shared Understanding

Mule batch job

  • 1. By Anirban Sen Chowdhary
  • 2. Mule ESB has the ability to process messages in batches. Within an application, we can initiate a batch job which is basically a block of code that splits a large messages into individual records, then performs actions upon each record, then reports on the results and potentially pushes the processed output to other systems or queues. This functionality is particularly useful when working with a large set of data for example Database where a large set of Data is required to retrieve or insert in a bulk. Source:- MuleSoft
  • 3. A batch job is a top-level element in Mule which exists outside all Mule flows. Generally a batch jobs split a large messages into small parts which is called records and which Mule processes asynchronously in a batch job; similarly just as flows process messages, batch jobs process records. A batch job contains one or more batch steps which, in turn, can contain any number of message processors or Mule component that act upon records as they move through the batch job. A batch job executes when triggered by either a batch executor in a Mule flow or a message source in a batch-accepting input which is when triggered, will create a new batch job instance. After all record are processed and passed though all the batch steps, the batch job instances is ended and result of all the batch jobs are accumulated and summarised in a report that reflect which batch job as succeed and which job has failed at the time of processing. Source:- MuleSoft
  • 4. Structure of batch job in Mule Config :- <batch:job name="myBatchJobSteps"> <batch:process-records> <batch:step name="Step1"/> <batch:step name="Step2"/> <batch:step name="Step3"/> <batch:step name="Step4"/> ……………………. </batch:process-records> </batch:job>
  • 5. The batch processing is useful in particular scenario :- • When a large message fails, for example a database insertion in bulk, we can continue with the rest. • When integrating a data sets, that may be small or large, streaming or not, to parallel process records. • When it require to handle a large quantities of incoming data from an API into a legacy system. • Synchronising data sets between various business applications. Example Netsuite and Salesforce Source:- MuleSoft
  • 6. There are basically 4 parts in Mule batch Job:- Input phase: In Input phase, we can place a one-way message source and/or message processors to prepare the data that is actually going to be fed into the job. Here we are processing synchronously at a message level and this is an optional phase. Loading phase: This phase is automatic and implicit and we don’t have to do anything here. In this phase payload from Input phase are split into records and stored in persistent queues. Process phase: In this phase, each records is processed separately and independently and after that it is moved across the steps in an asynchronous and paralleled fashion. On Complete phase: In this phase you get a result object that tells you how many records were processed, how many succeeded, which ones failed (and in which step), etc. This is useful for generating reports and sending out notifications Source:- MuleSoft
  • 8. Let’s consider we have a simple Mule flow as following:- Here , we can see there are 3 phases :- In Input phase it is retrieving the data from databases at a fixed interval of time In Process phase it is executing 3 steps .. In step 1, it is inserting data into database.. In step 2 it is logging messages if any and in step 3, it is logging failed messages if any. In complete phase it log the Number of failed Records , Number of successful Records and Elapsed Time
  • 9. So, our Mule config will be as following:-
  • 10. So, if we run our flow, we will see the following in log :- Here you can see the Number of failed Records , Number of successful Records and Elapsed Time in the log
  • 11. So, here you can see how to use a Mule batch module. It’s pretty simple and effective in handling larges set of data 
  • 12. In my next slide I will bring some other techniques in Mule implementation . Hope you have enjoyed this simpler version. Keep sharing your knowledge and let our Mule community grow 