This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 281213db42f CAMEL-20145: camel-micrometer-prometheus - Need to init earlier to ensure route policy can be in use 281213db42f is described below commit 281213db42fbc43135d6256112cd3b9e5187c1d8 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Nov 22 19:15:26 2023 +0100 CAMEL-20145: camel-micrometer-prometheus - Need to init earlier to ensure route policy can be in use --- .../component/micrometer/prometheus/MicrometerPrometheus.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java b/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java index 6f4e983aae1..d8cab4db2e4 100644 --- a/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java +++ b/components/camel-micrometer-prometheus/src/main/java/org/apache/camel/component/micrometer/prometheus/MicrometerPrometheus.java @@ -212,11 +212,6 @@ public class MicrometerPrometheus extends ServiceSupport implements CamelMetrics } meterRegistry = (PrometheusMeterRegistry) found; } - } - - @Override - protected void doStart() throws Exception { - super.doStart(); if (ObjectHelper.isNotEmpty(binders)) { // load binders from micrometer @@ -262,6 +257,11 @@ public class MicrometerPrometheus extends ServiceSupport implements CamelMetrics factory.setMeterRegistry(meterRegistry); camelContext.setMessageHistoryFactory(factory); } + } + + @Override + protected void doStart() throws Exception { + super.doStart(); server = camelContext.hasService(MainHttpServer.class); router = VertxPlatformHttpRouter.lookup(camelContext);