Spring integration spring集成出站sftp通道适配器文件交付确认

Spring integration spring集成出站sftp通道适配器文件交付确认,spring-integration,Spring Integration,我们正在使用sftp通道适配器将文件发送到sftp服务器。是否有办法确认文件是否已交付? 我们面临的是服务器和sftp服务器之间的连接有时会断开,我们希望知道文件传输是否成功并重试。实际上,FileTransferringMessageHandler中的所有操作都是按顺序完成的。 因此,我确信您在日志中遇到了一个异常: catch (FileNotFoundException e) { throw new MessageDeliveryException(message, "File [

我们正在使用sftp通道适配器将文件发送到sftp服务器。是否有办法确认文件是否已交付?
我们面临的是服务器和sftp服务器之间的连接有时会断开,我们希望知道文件传输是否成功并重试。

实际上,
FileTransferringMessageHandler
中的所有操作都是按顺序完成的。 因此,我确信您在日志中遇到了一个异常:

catch (FileNotFoundException e) {
    throw new MessageDeliveryException(message, "File [" + inputStreamHolder.getName()
                + "] not found in local working directory; it was moved or deleted unexpectedly.", e);
}
catch (IOException e) {
        throw new MessageDeliveryException(message, "Failed to transfer file ["
                + inputStreamHolder.getName() + " -> " + fileName
                + "] from local directory to remote directory.", e);
}
catch (Exception e) {
    throw new MessageDeliveryException(message, "Error handling message for file ["
                + inputStreamHolder.getName() + " -> " + fileName + "]", e);            
}
支持
,其中一个可以是
(或
MessageHandlerRetryAdvice
bean参考)以满足您的需求


请在。

中查找更多信息。我们得到的例外情况是来自sftp库,其中显示“输入流已关闭”。我们是否有办法捕获此异常并对其进行审核?我还阅读了关于发送此类消息的errorChannel。我们还需要一些方法来跟踪文件是否已经成功传输。考虑使用<代码> ExpRealStudioReQuththand Lead建议 >代码> > MeasAdgLeReRebug建议> /代码>(或取而代之)。阅读相同的参考手册章节。