This application will monitor a directory and dispatch worker threads to read, process, and move files as quickly as possible.
- FileWatcher uses events to enqueue files that were created to a queue.
- MonitorService rallies workers (threads) to process files in the queue as they are added.
- MonitorService ensures required folders are created and read/writeable.
- MonitorService also scans the Input directory on a configurable interval and adds those file that are "truant"/late to the queue.
- Worker(s) dispatch the FileHandler to handle the dequeued file.
- FileHandler will instruct the IProcessor to process the file, then if successful move it to the Output directory.
- Worker(s) will requeue IO-related failures when trying to process a file.
- MonitorService will renqueue truant files that had failed to be processed.