We have a java application which reads all the records from table and forms a json document.finally all the json document is pushed to elastic search. this application takes more than 3 hours to complete as there are more than 1 million records. we tried to apply multithreading but the performance was not up to the mark. Hence we wanted to go for spring batch chunk processing.
But how to implement the same in spring batch. We cannot write pojo class for each table.We just iterate the resultset and form a json object. All the examples available uses pojo class
Steps involved.
- reads the data from database
- iterate the resultset and form a json object.
- push all the json object to Elasticsearch.