Apache Camel: Do I need to make my FTP-Consumer route transactional?(Apache Camel:我需要让我的 FTP-Consumer 路由交易吗?)
问题描述
我有这些 FTP 端点属性:
I have these FTP endpoint properties:
include=.*.xml&delay=60s&consumer.bridgeErrorHandler=true&throwExceptionOnConnectFailed=true&binary=true&move=.done&soTimeout=300000
所以端点需要每 60 秒搜索一次 *.xml 文件并使用它.之后,文件将继续并移动到完成"目录中.
So an endpoint need to search every 60 secounds the *.xml files and consume it. After that the files will be proceed and moved in 'done' directory.
恐怕如果 f.e.通过移动文件会发生 IOException,该文件将已从端点根目录中删除.
I'm afraid that if f.e. by doing the move of a file an IOException occures, the file will already be deleted from the endpoint root directory.
问题是:我需要让我的 FTP-Consumer 路由交易吗?
The question is: do I need to make my FTP-Consumer route transactional?
另一个问题是:您能否建议为这种情况添加另一个有用的 ftp 消费者属性?
Another question is: can you give an advise to add another usefull ftp consumer properties for this case?
推荐答案
如果 f.e.通过移动文件会发生 IOException
if f.e. by doing the move of a file an IOException occures
根据 GenericFileEndpoint.java 您可以使用 setMoveFailed() 来定义移动失败时将文件移动到哪里.FTP 端点应继承该选项,请参见此处:FtpEndpoint
According to GenericFileEndpoint.java you can use setMoveFailed() to define where to move the file if the moving fails.
The FTP endpoint should inherit that option, see here: FtpEndpoint
我认为您不需要使端点事务性.
I do not think that you need to make you endpoint transactional.
这篇关于Apache Camel:我需要让我的 FTP-Consumer 路由交易吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Apache Camel:我需要让我的 FTP-Consumer 路由交易吗?
基础教程推荐
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- Struts2 URL 无法访问 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
