I've been using Camel via Spring to pull files from an FTP to the local disk and then processing them. I'd like to be alerted when the route executes but doesn't find any files to pull. Is there a way to do this with stock camel?
If not; what I was thinking of doing was implementing a middle man in the form of a custom "validator". I'd then route from the camel-ftp component to the custom validator, then it could do some checks, send out notifications if needed, and route the file to the file component to be written to the filesystem.
I experimented with adding this middle-man and it seems that if no FTP files are found it won't even notify the middle-man.
See Question&Answers more detail:os