WSO2 EI - 处理 SFTP 错误并调用故障/错误序列 [英] WSO2 EI - Handle SFTP errors and invoke Fault/error Sequence

查看:37
本文介绍了WSO2 EI - 处理 SFTP 错误并调用故障/错误序列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 jms/http 代理写入 SFTP 位置.但是,当 SFTP 端点出现错误(密码错误、网络连接问题、远程目录不存在)时,我想触发故障序列并处理此错误(尝试一些 DLC 类型的场景).我发现除非您设置 OUT_ONLY=false,否则故障 Sequcence 不会调用 FTP 错误.但是,WSO2 文档建议为 ftp 写入设置 OUT_ONLY=true.类似的问题也在这里问.如何处理 WSO2 EI 6.4 中的 VFS 代理错误?

I'm trying to write a SFTP location through a jms/http proxy. However when there is an error on SFTP endpoint (wrong password, network connectivity issue, remote Dir not exists) I want to trigger fault sequence and handle this error (Try some DLC kind of scenario). I found that fault Sequcence is not invoking for FTP errors unless you set OUT_ONLY=false. However WSO2 docs recommends set OUT_ONLY=true for ftp writes. Similar Question is asked here too. How to handle VFS proxy error in WSO2 EI 6.4?

如果我设置 OUT_ONLY=false,它会为失败和成功的 FTP 写入触发 faultSquence.有什么解决方法可以捕获 FTP 错误并触发 faultSequence 吗?

If I set OUT_ONLY=false it triggers faultSquence for both failures and success FTP writes. Any workaround to catch FTP errors and trigger faultSequence ?

推荐答案

您可以在端点配置中定义 responseAction.请参考以下示例配置.responseAction 指定何时响应超时请求指定是丢弃它还是调用故障处理程序.除了在端点定义 responseAction 之外,您还可以将发送中介替换为文件连接器,并且它还会在错误期间调用故障序列.

You can define a responseAction in the endpoint configuration. Please refer to the following sample configuration. The responseAction spedifies when a response comes to a timed out request specifies whether to discard it or invoke the fault handler. Apart from defining the responseAction in the endpoint, you can replace the send mediator with the file connector and it will also invoke the fault sequence during an error.

 <send>
            <endpoint name="wms-fault-endpoint">
               <address uri="vfs:ftp://admin:admin1@localhost:2121/testJ/out">
                  <timeout>
                     <duration>10000</duration>
                     <responseAction>fault</responseAction>
                  </timeout>
               </address>
            </endpoint>
         </send>

[1]-https://docs.wso2.com/display/EI611/Endpoint+Error+Handling

[1]-https://docs.wso2.com/display/EI611/Endpoint+Error+Handling

[2]- https://docs.wso2.com/display/ESBCONNECTORS/文件+连接器

这篇关于WSO2 EI - 处理 SFTP 错误并调用故障/错误序列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆