Announcement Announcement Module
Collapse
No announcement yet.
How The Spring Batch can read the ever-changing file ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How The Spring Batch can read the ever-changing file ?

    How The Spring Batch can read the ever-changing file ?
    Which instrument in which way should I use ?

  • #2
    ever changing file meaning a file that's continuously being appended to? are you able to write your results to a file, process it then possibly move it and watch the directory for new files that have been fully written to?

    Comment


    • #3
      ever changing file meaning a file that's continuously being supplemented. The old content remains equals. I can't move the file to another folder after processing because the another application will be looking for old file and create a new one. File continuously being supplemented every minute or less. And if I move file every time after changing - In a few hours I will collect hundreds of files, although I would require only one

      Comment


      • #4
        not really clear on your use case. if your application is writing entries to a file in batches, you could time stamp the file, process it, then delete it if the job is successful (or have it restart after failure / fixing). maybe use spring integration to watch for new files in the directory and kick off the job. if your application is writing out one off messages, maybe use a message queue instead and schedule the job to process whatever it finds in the queue based each time it runs. creating an entirely new batch job execution just to process a single record at a time may be overkill.

        Comment


        • #5
          Originally posted by Chris Schaefer View Post
          if your application is writing entries to a file in batches
          This is NOT my application. There is another application, which continuously adds entries to the file. If I delete or rename(move) the file, it create a new file. I assumed that there is a mechanism in Spring Batch for the reading continually changing files

          Comment

          Working...
          X