【发布时间】:2013-07-31 23:38:43
【问题描述】:
我有一个非常简单的配置,它将文件从 FTP 服务器复制到文件出站。由于文件很大,我使用streaming 进行文件传输。这是我的配置:
<ftp:connector name="ftpConnector" streaming="true" pollingFrequency="360000"/>
<flow name="copyFTPtoFile">
<ftp:inbound-endpoint name="FTP" connector-ref="ftpConnector" host="FTP" port="21" user="test" password="test" path="/Testenv" />
<file:outbound-endpoint path="/vendor/in" />
</flow>
我不知道如何关闭input-stream,以便在复制文件后从 FTP 服务器中删除文件。
【问题讨论】:
-
Mule 应该会自动为您解决这个问题,不是吗?
-
当我在 ftp 连接器上有
streaming=true时不会。 。如果在入站端点上使用流式传输,则关闭输入流是用户的责任。如果在出站端点上使用流式传输,Mule 会自动关闭流。来自此 [link] mulesoft.org/documentation/display/current/… -
它们可能意味着如果您在自定义组件中接收流。