This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.14.x by this push:
     new 21743003965 CAMEL-18319: camel-core - Supervising route controller 
should not eager warmup routes
21743003965 is described below

commit 217430039654f56cda2b1c0ebf667fe4146427f4
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Thu Jul 28 15:53:17 2022 +0200

    CAMEL-18319: camel-core - Supervising route controller should not eager 
warmup routes
---
 .../org/apache/camel/impl/engine/AbstractCamelContext.java | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index f993c2d95b1..2e6eefb76f5 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -3294,12 +3294,14 @@ public abstract class AbstractCamelContext extends 
BaseService
             doDumpRoutes();
         }
 
-        // invoke this logic to warmup the routes and if possible also start 
the routes
-        StartupStep subStep = 
startupStepRecorder.beginStep(CamelContext.class, getName(), "Start Routes");
-        EventHelper.notifyCamelContextRoutesStarting(this);
-        internalRouteStartupManager.doStartOrResumeRoutes(routeServices, true, 
!doNotStartRoutesOnFirstStart, false, true);
-        EventHelper.notifyCamelContextRoutesStarted(this);
-        startupStepRecorder.endStep(subStep);
+        if (!getRouteController().isSupervising()) {
+            // invoke this logic to warmup the routes and if possible also 
start the routes (using default route controller)
+            StartupStep subStep = 
startupStepRecorder.beginStep(CamelContext.class, getName(), "Start Routes");
+            EventHelper.notifyCamelContextRoutesStarting(this);
+            internalRouteStartupManager.doStartOrResumeRoutes(routeServices, 
true, !doNotStartRoutesOnFirstStart, false, true);
+            EventHelper.notifyCamelContextRoutesStarted(this);
+            startupStepRecorder.endStep(subStep);
+        }
 
         long cacheCounter = beanIntrospection != null ? 
beanIntrospection.getCachedClassesCounter() : 0;
         if (cacheCounter > 0) {

Reply via email to