SlideShare a Scribd company logo
Mule batch processing
 Batch component is used to process huge messages in batches. In
batch we have 3 phases.
1. Input
2. Process Records
3. On complete
Input:
Input phase is used to prepare a collection object with input
message. Because process records phase expects a collection object.
Process Records:
 Process Record phase expects a collection object to process the
each record of collection in individually and parallel. Here each object
of collection is a record.
On Complete:
 On complete phase is used to summarize the flow. Following
variables are available in On Complete phase to get the status of flow.
• Count of Successful records
• Count of Failure records
• Count of total records.
Example:
 In the following example, it explains how to transform CSV to XML using
batch. This example exposes a HTTP rest service.
 In the main flow input csv file path sets to payload and refer to a batch
job.
 In Input phase, an expression component is used to read file
(src/main/resources/input.csv) data. This expression component refers
to a file (src/main/resources/ReadFile.txt) which has code to read file
data. Another expression component has below expression to create a
collection object.
 payload = new com.techm.common.util.LineIterator(payload);
 LineIterator is our custom class which implements Iterator Interface to
implement collection object. Below is code of LineIterator class.
Note : Java Code Continuation from line 31 on next slide.
Mule batch processing
 In Process Records phase, we have two batch steps to transform
payload from csv to xml using datamapper and write the xml data into
a file. Second batch step contains batch commit. The message
processors which are in batch commit scope get execute depends of
size of batch commit.
 <batch:commit size="5" doc:name="Batch Commit">
 This batch commit get executed for every 5 records as configured.
 On Complete phase has one logger component which logs
successful, failure and total no of records.
 Note : SOAP UI project to test this application is placed in
src/test/resources.
Thank You All

More Related Content

What's hot (18)

PPTX
Mule ESB - Mock Salesforce Interface
krishananth
 
PPTX
Junit in mule demo
javeed_mhd
 
PPTX
Mule testing
Sindhu VL
 
PPT
Mule - logger
Ankush Sharma
 
PPTX
Mule dataweave
Son Nguyen
 
PPTX
Using message enricher
Son Nguyen
 
PPTX
Xslt in mule
Mohammed246
 
PPTX
Mule Esb Data Weave
Mohammed246
 
PPTX
Mule enricher
Karnam Karthik
 
PPTX
Using spring task scheduler in java in mule
Anirban Sen Chowdhary
 
PPTX
Mule debugging
Sindhu VL
 
PPTX
Mule system properties
Ravinder Singh
 
PPTX
Splitting with mule part2
Anirban Sen Chowdhary
 
PPT
Mule introduction
Satya Sekhar Das Mandal
 
PPTX
Mule esb How to convert from CSV to Json in 5 minutes
Gennaro Spagnoli
 
PPTX
Filter expression in mule
Rajkattamuri
 
PPTX
Mule Ajax Connector
Ankush Sharma
 
PPTX
For each component in mule
Rajkattamuri
 
Mule ESB - Mock Salesforce Interface
krishananth
 
Junit in mule demo
javeed_mhd
 
Mule testing
Sindhu VL
 
Mule - logger
Ankush Sharma
 
Mule dataweave
Son Nguyen
 
Using message enricher
Son Nguyen
 
Xslt in mule
Mohammed246
 
Mule Esb Data Weave
Mohammed246
 
Mule enricher
Karnam Karthik
 
Using spring task scheduler in java in mule
Anirban Sen Chowdhary
 
Mule debugging
Sindhu VL
 
Mule system properties
Ravinder Singh
 
Splitting with mule part2
Anirban Sen Chowdhary
 
Mule introduction
Satya Sekhar Das Mandal
 
Mule esb How to convert from CSV to Json in 5 minutes
Gennaro Spagnoli
 
Filter expression in mule
Rajkattamuri
 
Mule Ajax Connector
Ankush Sharma
 
For each component in mule
Rajkattamuri
 

Viewers also liked (17)

PPTX
Mule batch job
Anirban Sen Chowdhary
 
PPTX
Mule properties
Ravinder Singh
 
PPTX
Dataweave 160103180124
vijay dhanakodi
 
PPTX
Mule using Salesforce
Khasim Cise
 
PPTX
Automatic documentation with mule
F K
 
PPTX
Mule esb How to convert from Object to Json in 5 minutes
Gennaro Spagnoli
 
PPT
Simple Poll in Mule
Christian Hipolito
 
ODP
Cloudhub deployment
D.Rajesh Kumar
 
ODP
Cloudhub – architecture
D.Rajesh Kumar
 
PPTX
Spring Boot Update
Sergi Almar i Graupera
 
PPTX
Mule ESB Training
Attune University
 
PPTX
Mule ESB Tutorial Part 2
Srikanth N
 
PPTX
Mule - error handling
Sindhu VL
 
PPT
Mulesoft ppt
Achyuta Lakshmi
 
PPTX
Mule ESB Tutorial Part 1
Srikanth N
 
PDF
Mule ESB Fundamentals
Naresh Chintalcheru
 
PDF
Mule ESB - Integration Simplified
Rich Software
 
Mule batch job
Anirban Sen Chowdhary
 
Mule properties
Ravinder Singh
 
Dataweave 160103180124
vijay dhanakodi
 
Mule using Salesforce
Khasim Cise
 
Automatic documentation with mule
F K
 
Mule esb How to convert from Object to Json in 5 minutes
Gennaro Spagnoli
 
Simple Poll in Mule
Christian Hipolito
 
Cloudhub deployment
D.Rajesh Kumar
 
Cloudhub – architecture
D.Rajesh Kumar
 
Spring Boot Update
Sergi Almar i Graupera
 
Mule ESB Training
Attune University
 
Mule ESB Tutorial Part 2
Srikanth N
 
Mule - error handling
Sindhu VL
 
Mulesoft ppt
Achyuta Lakshmi
 
Mule ESB Tutorial Part 1
Srikanth N
 
Mule ESB Fundamentals
Naresh Chintalcheru
 
Mule ESB - Integration Simplified
Rich Software
 
Ad

Similar to Mule batch processing (20)

PPTX
Mulebatch
shakeela shaik
 
PPTX
Mule batch
Gandham38
 
PPTX
M batching
Vasanthii Chowdary
 
PPTX
Mule batch
Karnam Karthik
 
PPTX
Mule batch introduction
Son Nguyen
 
PPT
Batch processing
Harish43
 
PPT
Batch processing
Harish43
 
PPT
Batch processing
bapiraju
 
PPTX
Introduction to transaction processing concepts and theory
Zainab Almugbel
 
PDF
What is COTI?
Ovidius GmbH
 
PPTX
Build process ppt.pptx
SHIVANISRECECE
 
PDF
Synchronization
misra121
 
PDF
How to Integrate Internet of Things with Webserver with
Ionela
 
PDF
Monit
Abhishek Singh
 
PDF
Toby
TinouTest
 
PDF
yyyyxxx
TinouTest
 
PDF
Toby5
TinouTest
 
PDF
Tinou uniq 1
TinouTest
 
PDF
yyyyxxx
TinouTest
 
Mulebatch
shakeela shaik
 
Mule batch
Gandham38
 
M batching
Vasanthii Chowdary
 
Mule batch
Karnam Karthik
 
Mule batch introduction
Son Nguyen
 
Batch processing
Harish43
 
Batch processing
Harish43
 
Batch processing
bapiraju
 
Introduction to transaction processing concepts and theory
Zainab Almugbel
 
What is COTI?
Ovidius GmbH
 
Build process ppt.pptx
SHIVANISRECECE
 
Synchronization
misra121
 
How to Integrate Internet of Things with Webserver with
Ionela
 
Toby
TinouTest
 
yyyyxxx
TinouTest
 
Toby5
TinouTest
 
Tinou uniq 1
TinouTest
 
yyyyxxx
TinouTest
 
Ad

More from Ravinder Singh (9)

PPTX
Mule in a nutshell
Ravinder Singh
 
PPTX
Mule java part-4
Ravinder Singh
 
PPTX
Mule java part-3
Ravinder Singh
 
PPTX
Mule java part-2
Ravinder Singh
 
PPTX
Mule java part-1
Ravinder Singh
 
PPTX
Mule enricher
Ravinder Singh
 
PPTX
Mule splitters
Ravinder Singh
 
PPTX
Mule expression
Ravinder Singh
 
PPT
Jms topics
Ravinder Singh
 
Mule in a nutshell
Ravinder Singh
 
Mule java part-4
Ravinder Singh
 
Mule java part-3
Ravinder Singh
 
Mule java part-2
Ravinder Singh
 
Mule java part-1
Ravinder Singh
 
Mule enricher
Ravinder Singh
 
Mule splitters
Ravinder Singh
 
Mule expression
Ravinder Singh
 
Jms topics
Ravinder Singh
 

Recently uploaded (20)

PPTX
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PPTX
Electrophysiology_of_Heart. Electrophysiology studies in Cardiovascular syste...
Rajshri Ghogare
 
PPTX
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
PPTX
Introduction to Probability(basic) .pptx
purohitanuj034
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PDF
EXCRETION-STRUCTURE OF NEPHRON,URINE FORMATION
raviralanaresh2
 
PPTX
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
PPTX
Translation_ Definition, Scope & Historical Development.pptx
DhatriParmar
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
PPTX
YSPH VMOC Special Report - Measles Outbreak Southwest US 7-20-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
PPT
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
PDF
John Keats introduction and list of his important works
vatsalacpr
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
Electrophysiology_of_Heart. Electrophysiology studies in Cardiovascular syste...
Rajshri Ghogare
 
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
Introduction to Probability(basic) .pptx
purohitanuj034
 
Basics and rules of probability with real-life uses
ravatkaran694
 
EXCRETION-STRUCTURE OF NEPHRON,URINE FORMATION
raviralanaresh2
 
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
Translation_ Definition, Scope & Historical Development.pptx
DhatriParmar
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 7-20-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
John Keats introduction and list of his important works
vatsalacpr
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 

Mule batch processing

  • 2.  Batch component is used to process huge messages in batches. In batch we have 3 phases. 1. Input 2. Process Records 3. On complete Input: Input phase is used to prepare a collection object with input message. Because process records phase expects a collection object.
  • 3. Process Records:  Process Record phase expects a collection object to process the each record of collection in individually and parallel. Here each object of collection is a record. On Complete:  On complete phase is used to summarize the flow. Following variables are available in On Complete phase to get the status of flow. • Count of Successful records • Count of Failure records • Count of total records.
  • 4. Example:  In the following example, it explains how to transform CSV to XML using batch. This example exposes a HTTP rest service.
  • 5.  In the main flow input csv file path sets to payload and refer to a batch job.
  • 6.  In Input phase, an expression component is used to read file (src/main/resources/input.csv) data. This expression component refers to a file (src/main/resources/ReadFile.txt) which has code to read file data. Another expression component has below expression to create a collection object.  payload = new com.techm.common.util.LineIterator(payload);  LineIterator is our custom class which implements Iterator Interface to implement collection object. Below is code of LineIterator class.
  • 7. Note : Java Code Continuation from line 31 on next slide.
  • 9.  In Process Records phase, we have two batch steps to transform payload from csv to xml using datamapper and write the xml data into a file. Second batch step contains batch commit. The message processors which are in batch commit scope get execute depends of size of batch commit.  <batch:commit size="5" doc:name="Batch Commit">  This batch commit get executed for every 5 records as configured.  On Complete phase has one logger component which logs successful, failure and total no of records.  Note : SOAP UI project to test this application is placed in src/test/resources.