Camel
  1. Camel
  2. CAMEL-5929

camel-quartz - Add temporal window activation to route policies

    Details

    • Estimated Complexity:
      Advanced

      Description

      I have several routes that run at different times during the business day. A
      CronScheduledRoutePolicy is used to control the polling schedule. For
      example, the system polls for a file via FTP between 14:00 and 15:00 each
      week day - the file is not guaranteed to be there prior to that time per our
      SLA with the vendor.

      The route policy is in place so that the system does not constantly badger
      the FTP server with useless requests.

      However, from time to time, we need to restart our server. What I've
      observed is that if the server is restarted at 14:30, the route must be
      manually enabled via JMX. We actually have 20-30 routes and this is a
      burden for our support team; they often miss a route or two.

      What I'd like to have is a policy that says "run this route every n minutes
      from 14:00 - 15:00 each weekday" - and have it activated even we restart the
      server at 14:30.

        Activity

        Hide
        Zemian Deng added a comment -

        The Quartz has a special trigger type that does exactly this: DailyTimeIntervalTrigger.

        However current camel-quartz component does not support other trigger types other than Cron or Simple. I would suggest to add a new option to camel-quartz component such as "useRegistryTrigger=<mySpecialTriger>" to lookup custom trigger instance in Camel Registry/Context space.

        Show
        Zemian Deng added a comment - The Quartz has a special trigger type that does exactly this: DailyTimeIntervalTrigger. However current camel-quartz component does not support other trigger types other than Cron or Simple. I would suggest to add a new option to camel-quartz component such as "useRegistryTrigger=<mySpecialTriger>" to lookup custom trigger instance in Camel Registry/Context space.
        Hide
        Zemian Deng added a comment -

        Actually, with the patch provided in CAMEL-6067, you can pre-register a trigger in Quartz, then specify the trigger name/group in your endpoint URI. The patch will allow it to use existing trigger!

        Show
        Zemian Deng added a comment - Actually, with the patch provided in CAMEL-6067 , you can pre-register a trigger in Quartz, then specify the trigger name/group in your endpoint URI. The patch will allow it to use existing trigger!
        Hide
        Zemian Deng added a comment -

        Ahhh, unfortunately Quartz's DailyTimeIntervalTrigger is only available in Quartz 2.x or higher, which in not backward compatible to existing camel-quartz (Quartz 1.8.x). So user will have to also wait for CAMEL-4075 to be completed before using getting this specific trigger feature.

        Show
        Zemian Deng added a comment - Ahhh, unfortunately Quartz's DailyTimeIntervalTrigger is only available in Quartz 2.x or higher, which in not backward compatible to existing camel-quartz (Quartz 1.8.x). So user will have to also wait for CAMEL-4075 to be completed before using getting this specific trigger feature.

          People

          • Assignee:
            Unassigned
            Reporter:
            Philip Glebow
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development