没有EOF的Mule File端点下载不完整的文件 [英] Mule File endpoint download incomplete file without EOF

查看:85
本文介绍了没有EOF的Mule File端点下载不完整的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

M流必须下载庞大的XML文件进行处理.当提供程序在输入文件夹中写入文件时,同时文件端点组件可能会下载不完整的文件,或者提供程序由于某些原因而无法完成写入过程. Mule API是否提供处理情况? 请指教.

Mule flow must download big and huge XML files to process. When provider writes a file in input folder, in the same time File endpoint component can download incomplete file or provider cannot complete write process for some reasons. Does Mule API provide handling the situation? Please advise.

推荐答案

文件连接器未下载数据,您是否与HTTP连接器混淆了?还是您是说Mule文件传输在文件生产者仍在复制文件的同时拾取了文件?

The file connector doesn't download data, are you mixing up with the HTTP connector? Or do you mean the Mule file transport picks-up a file while it is still being copied by the file producer?

如果是后者,最好的选择是将文件写入一个临时位置,然后将其移动到Mule拾取文件夹中,因为移动文件是原子操作.

If the latter, the best option is to write to file into a temporary location then move it to the Mule pick-up folder because moving a file is an atomic operation.

或者,您可以在文件连接器上使用fileAge属性,将Mule配置为仅拾取比指定时间更早的文件.仅当您了解文件编写器写入文件所花费的最长时间时,此方法才有效.

Alternatively, you can use the fileAge attribute on the file connector to configure Mule to only pick-up files that are older than the specified age. This can work only if you have an idea of the maximum time it takes the file writer to write the file.

这篇关于没有EOF的Mule File端点下载不完整的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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