使用骆驼FTP从多个位置拾取文件
我需要使用骆驼FTP从两个不同位置拾取文件。
当前,我的代码是
尝试{
from(format("sftp://%s@%s:22/../../..%s?password=%s&delete=true", ftpUserName, ftpServer, responsePath, ftpPassword ))
.filter(header("CamelFileName").endsWith(".PDF"))
.to(format("sftp://%s@%s:22/../../..%s/processed?password=%s", ftpUserName, ftpServer, responsePath, ftpPassword))
.process(documentProcessor)
/*.log(LoggingLevel.INFO, (org.slf4j.Logger) logger, "Download file ${file:name} complete.")*/
/*.to(downloadLocation)*/;
/*.to(format("smtp://relay.us.signintra.com?to=%s&[email protected]&subject=GTM response from cisco", emailTo))*/
;
} catch (Exception e) {
e.printStackTrace();
}
这是在application.properties文件中提到的文件。我该怎么做才能从多级位置拼凑文件。
i have a situation i need to pick up files from two different location using camel FTP.
currently my code is
try {
from(format("sftp://%s@%s:22/../../..%s?password=%s&delete=true", ftpUserName, ftpServer, responsePath, ftpPassword ))
.filter(header("CamelFileName").endsWith(".PDF"))
.to(format("sftp://%s@%s:22/../../..%s/processed?password=%s", ftpUserName, ftpServer, responsePath, ftpPassword))
.process(documentProcessor)
/*.log(LoggingLevel.INFO, (org.slf4j.Logger) logger, "Download file ${file:name} complete.")*/
/*.to(downloadLocation)*/;
/*.to(format("smtp://relay.us.signintra.com?to=%s&[email protected]&subject=GTM response from cisco", emailTo))*/
;
} catch (Exception e) {
e.printStackTrace();
}
This is picking up the file that is mentioned in the application.properties files. How can i do this to puck up files from multile locations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以配置多个FTP消费者路由,并将消息转发到共享的直接点。
示例:
如果您需要从单一路线中调用2 FTP消费者终点“ rel =“ nofollow noreferrer”> poll-enrich 。
You can configure multiple FTP consumer routes and forward the message to shared direct-endpoint.
Example:
If you need to call 2 FTP consumer endpoints from single route you can use poll-enrich.