java - How to close input stream of FTP inbound endpoint in Mule when streaming is used -
i have simple configuration copies file ftp server file outbound. using streaming
file transfer because of huge file sizes. config:
<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>
i not sure how close input-stream
files deleted ftp server once copied.
since payload inputstream
, following code of file outbound endpoint dispatcher executed:
inputstream = event.transformmessage(datatypefactory.create(inputstream.class)); ioutils.copylarge(is, fos); is.close();
so stream should automatically closed you.
Comments
Post a Comment