Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14577

QuartzEndpoint returns no trigger parameters

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.1.0
    • Component/s: camel-quartz
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      In my route I have to evaluate configuration of cron parameters at runtime. With Camel 2.x it worked, but in camel 3 QuartzEndpoint.getTriggerParameters returns empty map.

      In Example below it should contain timeZone parameter, but is empty.

      public class MyRoute extends RouteBuilder {
          @Override
          public void configure() throws Exception {
              String cron = String.format("quartz://job?cron=0+%s+%s+?+*+*&trigger.timeZone=%s&trigger.misfireInstruction=2", 59, 23, "Europe/Berlin");
      
              from(cron).routeId("cron").log("running ${body}").id("cronlog");  
      
            from("timer://foo?fixedRate=true&period=300s&delay=1s")
                      .routeId("start")
                      .process(exchange -> {
                          QuartzEndpoint endPoint =
      getContext().getEndpoint(cron, QuartzEndpoint.class);
                          Map<String, Object> triggers =
      endPoint.getTriggerParameters();
                          exchange.getIn().setBody(triggers.get("timeZone"));
                      })
                      .log("running ${body}").id("timerlog");
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              Holu Dennis
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: