A : 100 B : 200 C : 300 D : 400 A : 500 B : 600 C : 700 D : 800 A : 900 B : 1000 C : 1100 D : 1200 .... .... A : 3700 B : 3800 C : 3900 D : 4000The limit of the text file will be exactly 40 lines. Now, I have to read each group of:
A : 100 B : 200 C : 300 D : 400In exactly every one second. Now, this read group has to be pushed to an in-memory database (HSQLDB) but the way it gets persisted is different. There are slots available to persist the values of the group. The elements of C & D should get persisted at every 3rd second and elements A & B should get persisted at every 5th second. So at every 3rd second, all the elements of C & D should get persisted and same goes for elements A&B at every 5th second. By the way, these elements are tickers which are used in Financial industry. I searched a lot for any framework that fits into this and came across Spring Batch. There are in-built Reader and Writer to do such tasks. Also, there is Processor to process the data before getting written by the writer. I looked in the docs of Spring Batch and could not find much help for incorporating my requirement. Though there is `Chunk processing` and `commit interval`. My Questions:
commit-interval="4">I am completely new to Spring Batch and would appreciate for the quick responses. Thanks,
Discuss This Question: