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

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


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

commit 3fd9cac115b898d7e3457641a1a4db56dc12fe7a
Author: Claus Ibsen <[email protected]>
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 6bd6a8e816c..81f97ad688b 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
@@ -3358,12 +3358,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