Hi,

The file (and ftp) component has an option sendEmptyMessageWhenIdly.

You could do the following: have one route that consumes from the FTP server 
(with sendEmptyMessagesWhenIdle set to true). From there send the messages (via 
direct) to another route. That route checks for empty message bodies and if an 
empty message body is found it stops the first route with the controlbus 
endpoint.

Best regards
Stephan

-----Original Message-----
From: Ishada [mailto:[email protected]] 
Sent: Freitag, 20. November 2015 10:20
To: [email protected]
Subject: RE: Stop the route when there is no file on the SFTP component

I need to stop the route if there are no files on the endpoint.
My sequence of steps are as follows
1> Get Payload form JMS Queue.
2>Delete and zip all the files on the SFTP server.
3>Move the payload to the SFTP.

So in the 2nd step I am acquiring lock and once the files are deleted, I am
moving to the 3rd step.
But If there are no files on the SFTP server to delete, I am not able to
stop the route and move to the 3rd step.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Stop-the-route-when-there-is-no-file-on-the-SFTP-component-tp5774141p5774144.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to