Im trying to download a file with dynamic filenames using pollEnrich in a loop , when there is a conenction exception at pollEnrich it was not handled in onException block even io cannot us docatch after the pollenrich statment.
i also tried using throwExceptionOnConnectFailed=true in endpoint uri. Not no use.
do this have any workaround?
onException(Exception.class)
.log( "${exception.stacktrace}")
.end();
from("direct:DownloadFiles")
.loop(exchangeProperty("FileCount"))
.pollEnrich().simple("sftp://testeruser:password@localhost:24?
move=Processed&antInclude=*${property.soNumber}*.*").timeout(30000)
.to("TARGET SFTP endpoint")
.end();