I have a spring integration app deployed on two nodes in a cluster. they poll for incoming files on single directory (inbound file adapter) . If a file is picked up by a node and processed,sometimes the other node throws the below exceptions ,by trying to pick up the same file.
ERROR org.springframework.integration.handler.LoggingHandler - org.springframework.integration.MessageHandlingException: failed to write Message payload to file ..... Caused by: java.io.FileNotFoundException: /somedir/dir/file.txt (No such file or directory)
I know polling /clustering etc has been discussed a lot everywhere . did find an accurate explanation for this anywhere .I am trying to clean this up and keep the logs more cleaner.thanks in advance. Is there any simple config in the inbound file adapter to prevent this.