【问题标题】:Apache Camel-Quartz : Is it possible to transfer multiple files in a single iterationApache Camel-Quartz:是否可以在一次迭代中传输多个文件
【发布时间】:2016-06-01 08:16:18
【问题描述】:

我有如下骆驼配置

from("quartz2://myscheduler?cron=0+34/1+17+?+*+TUE&trigger.repeatCount=1")
.pollEnrich("sftp://user@host1/path/DirTest?recursive=true&password=pwd&move=.camel&moveFailed=.error")
.to("sftp://user@host2/DirTest?password=pwd&passiveMode=true&maximumReconnectAtrempts=3");

使用此配置,骆驼在给定的时间间隔内(在本例中为 1 分钟)仅传输一个文件。是否可以在一个间隔内传输多个文件??

提前致谢。

【问题讨论】:

    标签: java apache-camel quartz-scheduler


    【解决方案1】:

    不,poll-enrich 似乎不支持多个文件。您需要使用其他组件(例如控制总线)来执行此操作。看这里: https://qnalist.com/questions/4843799/pollenrich-all-the-files-in-a-directory

    【讨论】:

      【解决方案2】:

      如果您想安排将所有新文件从一个 FTP 服务器移动到另一个服务器,那么您可以直接在 FTP 上使用 cron 调度程序,这样就可以了

      from ftp
        to ftp
      

      更多详情:http://www.davsclaus.com/2013/08/apache-camel-212-even-easier-cron.html

      我认为这里有一些关于这个的问题,你可以尝试搜索。

      【讨论】:

        猜你喜欢
        • 2019-12-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-09-01
        • 2020-05-17
        • 1970-01-01
        • 1970-01-01
        • 2021-06-11
        相关资源
        最近更新 更多