You can use the option
sendEmptyMessageWhenIdle=true
As documented at (as the ftp component extends the file component and inheirts its options):
http://camel.apache.org/file2
When using sendEmptyMessageWhenIdle then an empty message is sent when there is no ftp files to poll.
You can then use a filter or content based router to detect the empty file and then send the email.
Also you may consider setting the delay option to a higher value so you wont try to poll so frequently as by default the delay is 500 ms.
delay=10s
For example to poll every 10th second instead.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…