Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-707

number of child services started seems to be increasing by one each time the route is restarted

    XMLWordPrintable

Details

    Description

      using camel-quartz to start/stop routes in Fuse ESB 7.1 . They are using the following route

      public class DebtorUpdatesToCreditManagerRouteBuilder extends RouteBuilder {
          private static final Logger LOG = LoggerFactory.getLogger(DebtorUpdatesToCreditManagerRouteBuilder.class);
       
          protected static final String ROUTE_ID = "started-and-stopped-route";
       
          private static final int ALLOWED_GRACE_PERIOD_IN_MILLISECONDS = 100;
       
          private static final String START_ROUTE_SCHEDULE = "10 */1 * * * ? *";
          private static final String STOP_ROUTE_SCHEDULE  = "40 */1 * * * ? *";
       
          private static final String CONSUMING_ENDPOINT = "jms:inputQueue";
       
          @Override
          public void configure() {
              from(CONSUMING_ENDPOINT)
                  .noAutoStartup()
                  .routeId(ROUTE_ID)
                  .routePolicy(startStopPolicy())
                  .log(LoggingLevel.DEBUG, ROUTE_ID, " ${body}")
                  .process(aProcessor);
              
            
          }
       
          private CronScheduledRoutePolicy startStopPolicy() {
              final CronScheduledRoutePolicy result = new CronScheduledRoutePolicy();
       
              LOG.info(
                    String.format("Creating route with start schedule: '%s', and stop schedule '%s'",
                            START_ROUTE_SCHEDULE,
                            STOP_ROUTE_SCHEDULE)
              );
       
              result.setRouteStartTime(START_ROUTE_SCHEDULE);
              result.setRouteStopTime(STOP_ROUTE_SCHEDULE);
       
              result.setRouteStopGracePeriod(ALLOWED_GRACE_PERIOD_IN_MILLISECONDS);
              result.setTimeUnit(TimeUnit.MILLISECONDS);
       
              return result;
          }
       
          private Processor aProcessor = new Processor() {
       
              @Override
              public void process(final Exchange exchange) throws Exception {
                  LOG.info("Do something with [" + exchange + "]");
              }
          };
      }
      
      

      The number of child services started seems to be increasing by one each time the route is started - I have taken an excert from the logs to illustrate

      62-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting services on route: started-and-stopped-route
      16:41:10,003 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> Instrumentation:route[DelegateAsync[RoutePolicy[[org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy@4f03a2d8]]]]
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> DelegateAsync[RoutePolicy[[org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy@4f03a2d8]]]
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> RoutePolicy[[org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy@4f03a2d8]]
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> UnitOfWork(RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]]]]]]]]]])
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]]]]]]]]]
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]]]]]]]]
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]]]]]]]
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]]]]]]
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]]]]]
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> RouteContextProcessor[RouteContextProcessor[RouteContextProcessor[Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]]]]
      16:41:10,004 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> RouteContextProcessor[RouteContextProcessor[Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]]]
      16:41:10,005 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> RouteContextProcessor[Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]]
      16:41:10,005 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> Pipeline[[Channel[Log(started-and-stopped-route)[ ${body}]], Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]]]
      16:41:10,005 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> Channel[Log(started-and-stopped-route)[ ${body}]]
      16:41:10,005 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> Log(started-and-stopped-route)[ ${body}]
      16:41:10,008 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> Channel[Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22]
      16:41:10,008 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> Wrap[com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22] -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22
      16:41:10,012 | DEBUG | DefaultQuartzScheduler-262-camel-3_Worker-8 | RouteService                     | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Starting child service on route: started-and-stopped-route -> com.acme.DebtorUpdatesToCreditManagerRouteBuilder$1@4d74bd22
      16:41:10,021 | INFO  | DefaultQuartzScheduler-262-camel-3_Worker-8 | OsgiSpringCamelContext   
      
      

      Attachments

        Activity

          People

            cibsen@redhat.com Claus Ibsen
            rhn-support-pfox Patrick Fox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: