Is there any sane way to handle authentication failure at an sftp endpoint?
I have a camel route with sftp endpoint, specifically it moves files to sftp. When the sftp location is not available, i want to:
- If its an authentication failure, log, and do not retry. Move original files to failure folder.
- If the host is unknow, log and dont retry. Move original files to failure folder.
- Otherwise: retry a few times before failure.
Unfortunately SftpOperations always keeps on retrying. In the case of authentication failure (which can easily happen if the person deploying the app makes a typo in the properties file) this means repeated attempts with the wrong credentials. If it's just the password that is wrong, it may lead to the user being blocked.