SlideShare a Scribd company logo
Mule Batch
Processing
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.
Mulebatch
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

PPTX
Mule batch
Karnam Karthik
 
PPTX
M batching
Vasanthii Chowdary
 
PPTX
Mule batch introduction
Son Nguyen
 
PPTX
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Flink Forward
 
PPTX
Stephan Ewen - Scaling to large State
Flink Forward
 
PPTX
Click-Through Example for Flink’s KafkaConsumer Checkpointing
Robert Metzger
 
PDF
Francesco Versaci - Flink in genomics - efficient and scalable processing of ...
Flink Forward
 
PPTX
Mpi collective communication operations
Shah Zaib
 
Mule batch
Karnam Karthik
 
M batching
Vasanthii Chowdary
 
Mule batch introduction
Son Nguyen
 
Robert Metzger - Connecting Apache Flink to the World - Reviewing the streami...
Flink Forward
 
Stephan Ewen - Scaling to large State
Flink Forward
 
Click-Through Example for Flink’s KafkaConsumer Checkpointing
Robert Metzger
 
Francesco Versaci - Flink in genomics - efficient and scalable processing of ...
Flink Forward
 
Mpi collective communication operations
Shah Zaib
 

What's hot (20)

PDF
Flink Forward SF 2017: Stephan Ewen - Experiences running Flink at Very Large...
Flink Forward
 
PDF
Flink Forward Berlin 2017: Maciek Próchniak - TouK Nussknacker - creating Fli...
Flink Forward
 
PDF
Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...
Flink Forward
 
PDF
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward
 
PDF
Flink Forward Berlin 2017: Boris Lublinsky, Stavros Kontopoulos - Introducing...
Flink Forward
 
PPTX
Continuous Processing with Apache Flink - Strata London 2016
Stephan Ewen
 
PDF
Stream Loops on Flink - Reinventing the wheel for the streaming era
Paris Carbone
 
PDF
Flink Forward Berlin 2017: Zohar Mizrahi - Python Streaming API
Flink Forward
 
PPTX
Apache flink 1.0.0 overview
MapR Technologies
 
PDF
MicroCPH: Observability and Product Release
Sneha Inguva
 
PPTX
Flink Forward SF 2017: Stephan Ewen - Convergence of real-time analytics and ...
Flink Forward
 
PDF
Flink Connector Development Tips & Tricks
Eron Wright
 
PPTX
Flink Forward SF 2017: Timo Walther - Table & SQL API – unified APIs for bat...
Flink Forward
 
PDF
I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...
Jonas Traub
 
PDF
Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...
Flink Forward
 
PPTX
Flink Forward SF 2017: Till Rohrmann - Redesigning Apache Flink’s Distributed...
Flink Forward
 
PDF
Flink Forward Berlin 2017: Andreas Kunft - Efficiently executing R Dataframes...
Flink Forward
 
PPTX
What's new in 1.9.0 blink planner - Kurt Young, Alibaba
Flink Forward
 
PDF
Event driven-arch
Mohammed Shoaib
 
Flink Forward SF 2017: Stephan Ewen - Experiences running Flink at Very Large...
Flink Forward
 
Flink Forward Berlin 2017: Maciek Próchniak - TouK Nussknacker - creating Fli...
Flink Forward
 
Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...
Flink Forward
 
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward
 
Flink Forward Berlin 2017: Boris Lublinsky, Stavros Kontopoulos - Introducing...
Flink Forward
 
Continuous Processing with Apache Flink - Strata London 2016
Stephan Ewen
 
Stream Loops on Flink - Reinventing the wheel for the streaming era
Paris Carbone
 
Flink Forward Berlin 2017: Zohar Mizrahi - Python Streaming API
Flink Forward
 
Apache flink 1.0.0 overview
MapR Technologies
 
MicroCPH: Observability and Product Release
Sneha Inguva
 
Flink Forward SF 2017: Stephan Ewen - Convergence of real-time analytics and ...
Flink Forward
 
Flink Connector Development Tips & Tricks
Eron Wright
 
Flink Forward SF 2017: Timo Walther - Table & SQL API – unified APIs for bat...
Flink Forward
 
I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...
Jonas Traub
 
Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...
Flink Forward
 
Flink Forward SF 2017: Till Rohrmann - Redesigning Apache Flink’s Distributed...
Flink Forward
 
Flink Forward Berlin 2017: Andreas Kunft - Efficiently executing R Dataframes...
Flink Forward
 
What's new in 1.9.0 blink planner - Kurt Young, Alibaba
Flink Forward
 
Event driven-arch
Mohammed Shoaib
 
Ad

Viewers also liked (18)

PDF
Presentacion A lus do mundo. Santiago 2016. Alumnado
IES Poeta Díaz Castro
 
DOCX
Word 2 tha mutha.pt.249
Celifahmain
 
PDF
Cie 10 odontologia
Guille aguero Ricra
 
PPTX
STARMALL BATAAN
Paola Marie Caluya,rMP
 
PDF
Dimitar (Mitko) Frangov - Selection de travaux en assistant photographe
Dimitar Frangov
 
PPTX
Energias Alternativas
Facundo Campo
 
PPT
عرض_الجمعية[1]
صلاح الناصح
 
PPTX
Resulset
LUISA VEGA MONTENEGRO
 
PPTX
Variables aleatorias y distribuciones de probabilidad
Laura Pacheco lobo
 
PPTX
GST COUNCIL
anshuman a s
 
PPTX
The climateof india
eng2group3work
 
PPTX
Trouble-free travel (final)
eng2group3work
 
DOCX
Word 2 tha mutha.pt.263
Celifahmain
 
PPTX
Climate change
eng2group3work
 
DOCX
Chungresume2016-17
Eric Chung
 
Presentacion A lus do mundo. Santiago 2016. Alumnado
IES Poeta Díaz Castro
 
Word 2 tha mutha.pt.249
Celifahmain
 
Cie 10 odontologia
Guille aguero Ricra
 
STARMALL BATAAN
Paola Marie Caluya,rMP
 
Dimitar (Mitko) Frangov - Selection de travaux en assistant photographe
Dimitar Frangov
 
Energias Alternativas
Facundo Campo
 
عرض_الجمعية[1]
صلاح الناصح
 
Variables aleatorias y distribuciones de probabilidad
Laura Pacheco lobo
 
GST COUNCIL
anshuman a s
 
The climateof india
eng2group3work
 
Trouble-free travel (final)
eng2group3work
 
Word 2 tha mutha.pt.263
Celifahmain
 
Climate change
eng2group3work
 
Chungresume2016-17
Eric Chung
 
Ad

Similar to Mulebatch (20)

PPTX
Mule batch processing
Ravinder Singh
 
PPTX
Mule batch
Gandham38
 
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
 
PDF
Toby
TinouTest
 
PDF
yyyyxxx
TinouTest
 
PDF
Toby5
TinouTest
 
PDF
Tinou uniq 1
TinouTest
 
PDF
yyyyxxx
TinouTest
 
PDF
Toby6
TinouTest
 
PDF
Toby3
TinouTest
 
PDF
yyyyxxx
TinouTest
 
PDF
Toby3
TinouTest
 
PDF
Monit a1
TinouTest
 
PDF
yyyyxxx
TinouTest
 
Mule batch processing
Ravinder Singh
 
Mule batch
Gandham38
 
Batch processing
Harish43
 
Batch processing
Harish43
 
Batch processing
bapiraju
 
Introduction to transaction processing concepts and theory
Zainab Almugbel
 
What is COTI?
Ovidius GmbH
 
Toby
TinouTest
 
yyyyxxx
TinouTest
 
Toby5
TinouTest
 
Tinou uniq 1
TinouTest
 
yyyyxxx
TinouTest
 
Toby6
TinouTest
 
Toby3
TinouTest
 
yyyyxxx
TinouTest
 
Toby3
TinouTest
 
Monit a1
TinouTest
 
yyyyxxx
TinouTest
 

Recently uploaded (20)

PDF
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PPTX
Online Cab Booking and Management System.pptx
diptipaneri80
 
PPTX
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
PDF
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
PPTX
quantum computing transition from classical mechanics.pptx
gvlbcy
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PDF
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
PPTX
Information Retrieval and Extraction - Module 7
premSankar19
 
PPTX
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
PPTX
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
DOCX
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
PDF
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
PPTX
Tunnel Ventilation System in Kanpur Metro
220105053
 
PPTX
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
Online Cab Booking and Management System.pptx
diptipaneri80
 
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
quantum computing transition from classical mechanics.pptx
gvlbcy
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
Information Retrieval and Extraction - Module 7
premSankar19
 
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
Tunnel Ventilation System in Kanpur Metro
220105053
 
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 

Mulebatch

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