Apache camel Blueprint的Camel FTP组件始终运行
我试图通过使用camel ftp组件从远程ftp服务器获取文件。我正在使用blueprint开发我的示例 如果我像component()主页中的示例那样实现它,我就不会有任何问题 我的问题是,当我只能使用这个组件作为消费者时,它总是监听远程目录 (Apache camel Blueprint的Camel FTP组件始终运行,apache-camel,blueprint-osgi,Apache Camel,Blueprint Osgi,我试图通过使用camel ftp组件从远程ftp服务器获取文件。我正在使用blueprint开发我的示例 如果我像component()主页中的示例那样实现它,我就不会有任何问题 我的问题是,当我只能使用这个组件作为消费者时,它总是监听远程目录 () 我想做的事情是用seda触发这个路由,在一次运行之后,它应该把文件放到本地目录,然后继续下一个路由,如下所示(由于路由中的double-from,它不能正常工作) http://www.osgi.org/xmlns/blueprint/v1.0
http://www.osgi.org/xmlns/blueprint/v1.0.0
“>
.
.
.
看看路由策略,它允许您将路由与石英路由策略相关联,您可以在路由应处于活动状态时配置开始|停止间隔 请参阅以下链接。然后您只需要一条路线:
<?xml version="1.0" encoding="UTF-8"?>
<camelContext id="blueprintContext" trace="false"
xmlns="http://camel.apache.org/schema/blueprint">
<route id="source_quartz">
<from
uri="quartz://myGroup/myTimerName?trigger.repeatInterval=10000&trigger.repeatCount=0" />
<to uri="seda:step1" />
</route>
<route id="ftp_ruote">
<from uri="seda:step1" />
<from uri="sftp://test@remoteServer//var/opt/test?password=secret"/>
<to uri="file:///local/test" />
<to uri="seda:step2" />
</route>
.
.
.
</camelContext>