I'm using Spring-Integration (File) 5.4.6 to listen for changes on a directory. As watcher, I'm using the setUseWatchService
of the FileReadingMessageSource
.
If a new file is available it will be picked up and processed. The service is working well on the local filesystem also with a large number of files. But if the service is listening on a network drive, the drive is mounted over SMB, not all files are picked up. There is no error message ... I assume that the filesystem events are not always triggered.
Can anybody confirm this? I've done a lot of tests ... everything is working well on the local filesystem ... the problem occurs only on a network drive. The service is running in a Windows 10 VM.
I'm not aware how network mounted drive works, but here is a Spring Integration extension for SMB protocol: https://github.com/spring-projects/spring-integration-extensions/tree/main/spring-integration-smb. Probably that one will help you somehow to implement your solution without relying on the filesystem simulation via network maunting.