SlideShare a Scribd company logo
1 of 13
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
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

What's hot

Features of mobile ip
Features of mobile ipFeatures of mobile ip
Features of mobile ippriya Nithya
 
Computer networking
Computer networkingComputer networking
Computer networkingAbdul Rehman
 
What is network topology, Bus, Star, Ring, Tree, Mesh topology
What is network topology, Bus, Star, Ring, Tree, Mesh topologyWhat is network topology, Bus, Star, Ring, Tree, Mesh topology
What is network topology, Bus, Star, Ring, Tree, Mesh topologyA. S. M. Shafi
 
Computer network and its topologies
Computer network and its topologiesComputer network and its topologies
Computer network and its topologiesAyush0734
 
Network Connecting Devices UNIT 5
Network Connecting Devices UNIT 5Network Connecting Devices UNIT 5
Network Connecting Devices UNIT 5Raj vardhan
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
Network topology 3D Animation
Network topology  3D  AnimationNetwork topology  3D  Animation
Network topology 3D AnimationKaran Singh
 
Peer To Peer Networking
Peer To Peer NetworkingPeer To Peer Networking
Peer To Peer Networkingicanhasfay
 
EC8004 wireless networks unit 1 IEEE802.11
EC8004 wireless networks unit 1 IEEE802.11EC8004 wireless networks unit 1 IEEE802.11
EC8004 wireless networks unit 1 IEEE802.11HemalathaR31
 
Load balancing in Distributed Systems
Load balancing in Distributed SystemsLoad balancing in Distributed Systems
Load balancing in Distributed SystemsRicha Singh
 
Chapter7 Computer Networks
Chapter7 Computer NetworksChapter7 Computer Networks
Chapter7 Computer NetworksMuhammad Waqas
 
introduction to Networking
introduction to Networkingintroduction to Networking
introduction to Networkingiicecollege
 
Computer networks and its components by narender singh sandhu
Computer networks and its components by narender singh sandhuComputer networks and its components by narender singh sandhu
Computer networks and its components by narender singh sandhuNarenderSinghSandhu2
 

What's hot (20)

Features of mobile ip
Features of mobile ipFeatures of mobile ip
Features of mobile ip
 
Computer networking
Computer networkingComputer networking
Computer networking
 
Day 1.2 physical topologies
Day 1.2 physical topologiesDay 1.2 physical topologies
Day 1.2 physical topologies
 
Router switch and hub
Router switch and hubRouter switch and hub
Router switch and hub
 
Concurrency
ConcurrencyConcurrency
Concurrency
 
What is network topology, Bus, Star, Ring, Tree, Mesh topology
What is network topology, Bus, Star, Ring, Tree, Mesh topologyWhat is network topology, Bus, Star, Ring, Tree, Mesh topology
What is network topology, Bus, Star, Ring, Tree, Mesh topology
 
Computer network and its topologies
Computer network and its topologiesComputer network and its topologies
Computer network and its topologies
 
Network devices
Network devicesNetwork devices
Network devices
 
Network Connecting Devices UNIT 5
Network Connecting Devices UNIT 5Network Connecting Devices UNIT 5
Network Connecting Devices UNIT 5
 
HTTP/2 and SAP Fiori
HTTP/2 and SAP FioriHTTP/2 and SAP Fiori
HTTP/2 and SAP Fiori
 
Computer Networks
Computer NetworksComputer Networks
Computer Networks
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Network topology 3D Animation
Network topology  3D  AnimationNetwork topology  3D  Animation
Network topology 3D Animation
 
Peer To Peer Networking
Peer To Peer NetworkingPeer To Peer Networking
Peer To Peer Networking
 
Hub,Switch.Router
Hub,Switch.RouterHub,Switch.Router
Hub,Switch.Router
 
EC8004 wireless networks unit 1 IEEE802.11
EC8004 wireless networks unit 1 IEEE802.11EC8004 wireless networks unit 1 IEEE802.11
EC8004 wireless networks unit 1 IEEE802.11
 
Load balancing in Distributed Systems
Load balancing in Distributed SystemsLoad balancing in Distributed Systems
Load balancing in Distributed Systems
 
Chapter7 Computer Networks
Chapter7 Computer NetworksChapter7 Computer Networks
Chapter7 Computer Networks
 
introduction to Networking
introduction to Networkingintroduction to Networking
introduction to Networking
 
Computer networks and its components by narender singh sandhu
Computer networks and its components by narender singh sandhuComputer networks and its components by narender singh sandhu
Computer networks and its components by narender singh sandhu
 

Viewers also liked (20)

Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Mule properties
Mule propertiesMule properties
Mule properties
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data Weave
 
Splitting with mule
Splitting with muleSplitting with mule
Splitting with mule
 
Dataweave 160103180124
Dataweave 160103180124Dataweave 160103180124
Dataweave 160103180124
 
Mule with composite source
Mule with composite sourceMule with composite source
Mule with composite source
 
Filter expression in mule demo
Filter expression in mule demoFilter expression in mule demo
Filter expression in mule demo
 
Mule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutesMule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutes
 
Simple Poll in Mule
Simple Poll in MuleSimple Poll in Mule
Simple Poll in Mule
 
Cloudhub deployment
Cloudhub deploymentCloudhub deployment
Cloudhub deployment
 
Cloudhub – architecture
Cloudhub – architectureCloudhub – architecture
Cloudhub – architecture
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Scatter gather in mule
Scatter gather in muleScatter gather in mule
Scatter gather in mule
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
 
Json to json transformation in mule
Json to json transformation in muleJson to json transformation in mule
Json to json transformation in mule
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 
Spring Boot Update
Spring Boot UpdateSpring Boot Update
Spring Boot Update
 
Mule ESB Training
Mule ESB TrainingMule ESB Training
Mule ESB Training
 

Similar to Mule batch job

Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in muleSon Nguyen
 
Batch processing
Batch processingBatch processing
Batch processingHarish43
 
Batch processing
Batch processingBatch processing
Batch processingHarish43
 
Batch processing
Batch processingBatch processing
Batch processingbapiraju
 
Batch job processing
Batch job processingBatch job processing
Batch job processingSon Nguyen
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processingPhaniu
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processingPhaniu
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processingPhaniu
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processingirfan1008
 
Mule Esb Batch process
Mule Esb Batch processMule Esb Batch process
Mule Esb Batch processBui Kiet
 
Mulesoft anypoint batch processing
Mulesoft anypoint batch processingMulesoft anypoint batch processing
Mulesoft anypoint batch processingakshay yeluru
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processingAnand kalla
 
Mule concepts
Mule conceptsMule concepts
Mule conceptsSindhu VL
 

Similar to Mule batch job (20)

Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
 
Batch processing
Batch processingBatch processing
Batch processing
 
Batch processing
Batch processingBatch processing
Batch processing
 
Batch processing
Batch processingBatch processing
Batch processing
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Mule esb batch
Mule esb  batchMule esb  batch
Mule esb batch
 
Batch processing
Batch processingBatch processing
Batch processing
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Mule batch processing
Mule  batch processingMule  batch processing
Mule batch processing
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Mule Esb Batch process
Mule Esb Batch processMule Esb Batch process
Mule Esb Batch process
 
Mulesoft anypoint batch processing
Mulesoft anypoint batch processingMulesoft anypoint batch processing
Mulesoft anypoint batch processing
 
Batch processing
Batch processingBatch processing
Batch processing
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Mule concepts
Mule conceptsMule concepts
Mule concepts
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 

More from Anirban Sen Chowdhary

Overview in ringcentral digital line
Overview in ringcentral digital lineOverview in ringcentral digital line
Overview in ringcentral digital lineAnirban Sen Chowdhary
 
RingCentral application development overview
RingCentral application development overviewRingCentral application development overview
RingCentral application development overviewAnirban Sen Chowdhary
 
Overview on ring central errors part 4
Overview on ring central errors part 4Overview on ring central errors part 4
Overview on ring central errors part 4Anirban Sen Chowdhary
 
Setting up your ring central sandbox in steps
Setting up your ring central sandbox in stepsSetting up your ring central sandbox in steps
Setting up your ring central sandbox in stepsAnirban Sen Chowdhary
 
Overview on ring central errors: part 2
Overview on ring central errors: part 2Overview on ring central errors: part 2
Overview on ring central errors: part 2Anirban Sen Chowdhary
 
Call recording overview ring central
Call recording overview  ring centralCall recording overview  ring central
Call recording overview ring centralAnirban Sen Chowdhary
 
Ring central engaging with amazon alexa
Ring central engaging with amazon alexaRing central engaging with amazon alexa
Ring central engaging with amazon alexaAnirban Sen Chowdhary
 
How ring central sdk changing the game
How ring central sdk changing the gameHow ring central sdk changing the game
How ring central sdk changing the gameAnirban Sen Chowdhary
 
When ring central connect salesforce
When ring central connect salesforceWhen ring central connect salesforce
When ring central connect salesforceAnirban Sen Chowdhary
 
Ring central connecting salesforce overview
Ring central connecting salesforce overviewRing central connecting salesforce overview
Ring central connecting salesforce overviewAnirban Sen Chowdhary
 
Ring central call logs overview (part 2)
Ring central call logs overview (part 2)Ring central call logs overview (part 2)
Ring central call logs overview (part 2)Anirban Sen Chowdhary
 

More from Anirban Sen Chowdhary (20)

Change the game with Game changer
Change the game with Game changerChange the game with Game changer
Change the game with Game changer
 
Ring central desktop app overview
Ring central desktop app overviewRing central desktop app overview
Ring central desktop app overview
 
Overview in ringcentral digital line
Overview in ringcentral digital lineOverview in ringcentral digital line
Overview in ringcentral digital line
 
Some basics with ring central
Some basics with ring centralSome basics with ring central
Some basics with ring central
 
Ring central and python
Ring central and pythonRing central and python
Ring central and python
 
RingCentral application development overview
RingCentral application development overviewRingCentral application development overview
RingCentral application development overview
 
Cloze connect ringcentral
Cloze connect ringcentralCloze connect ringcentral
Cloze connect ringcentral
 
Overview on ring central errors part 4
Overview on ring central errors part 4Overview on ring central errors part 4
Overview on ring central errors part 4
 
Setting up your ring central sandbox in steps
Setting up your ring central sandbox in stepsSetting up your ring central sandbox in steps
Setting up your ring central sandbox in steps
 
Overview on ring central errors: part 2
Overview on ring central errors: part 2Overview on ring central errors: part 2
Overview on ring central errors: part 2
 
Overview on ring central errors
Overview on ring central errorsOverview on ring central errors
Overview on ring central errors
 
Call recording overview ring central
Call recording overview  ring centralCall recording overview  ring central
Call recording overview ring central
 
Ring central engaging with amazon alexa
Ring central engaging with amazon alexaRing central engaging with amazon alexa
Ring central engaging with amazon alexa
 
How ring central sdk changing the game
How ring central sdk changing the gameHow ring central sdk changing the game
How ring central sdk changing the game
 
When ring central connect salesforce
When ring central connect salesforceWhen ring central connect salesforce
When ring central connect salesforce
 
Mule 4 connecting ring central
Mule 4 connecting ring centralMule 4 connecting ring central
Mule 4 connecting ring central
 
Ring central sdk
Ring central sdkRing central sdk
Ring central sdk
 
Ring central with okta
Ring central with oktaRing central with okta
Ring central with okta
 
Ring central connecting salesforce overview
Ring central connecting salesforce overviewRing central connecting salesforce overview
Ring central connecting salesforce overview
 
Ring central call logs overview (part 2)
Ring central call logs overview (part 2)Ring central call logs overview (part 2)
Ring central call logs overview (part 2)
 

Recently uploaded

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

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
  • 7.
  • 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 