You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "mertdotcc (via GitHub)" <gi...@apache.org> on 2023/04/03 21:30:05 UTC

[GitHub] [camel-k] mertdotcc opened a new issue, #4225: duplicate routeId issue

mertdotcc opened a new issue, #4225:
URL: https://github.com/apache/camel-k/issues/4225

   I noticed something strange when I was looking into the metrics exposed by one of my test integrations at `.../q/metrics` endpoint:
   
   ```
   # HELP application_camel_route_exchanges_completed_total The total number of completed exchanges for a route or Camel Context
   # TYPE application_camel_route_exchanges_completed_total counter
   application_camel_route_exchanges_completed_total{camelContext="camel-1",routeId="mertGet"} 0.0
   application_camel_route_exchanges_completed_total{camelContext="camel-1",routeId="mertPost"} 0.0
   application_camel_route_exchanges_completed_total{camelContext="camel-1",routeId="route1"} 1.0
   application_camel_route_exchanges_completed_total{camelContext="camel-1",routeId="route2"} 0.0
   ```
   
   I have two routes within my integration: `mertGet` and `mertPost` but looking into these metrics exposed by the integration, I see 4 routes.
   
   When I look at the logs of my integration, it's the same thing:
   ```
   exec java -Xmx269M -cp ./resources:/etc/camel/application.properties:/etc/camel/conf.d/_resources:/etc/camel/resources:/etc/camel/resources/sample-error-response.json:/etc/camel/resources/simple-body.json:/etc/camel/sources/TestOne.java:/etc/camel/sources/test-one-openapi.xml:dependencies/app/camel-k-integration-1.12.0.jar:dependencies/lib/boot/io.github.crac.org-crac-0.1.3.jar:dependencies/lib/boot/io.quarkus.quarkus-bootstrap-runner-2.16.0.Final.jar:dependencies/lib/boot/io.quarkus.quarkus-development-mode-spi-2.16.0.Final.jar:dependencies/lib/boot/io.quarkus.quarkus-vertx-latebound-mdc-provider-2.16.0.Final.jar:dependencies/lib/boot/io.smallrye.common.smallrye-common-io-1.13.2.jar:dependencies/lib/boot/org.glassfish.jakarta.json-1.1.6.jar:dependencies/lib/boot/org.graalvm.sdk.graal-sdk-22.3.0.jar:dependencies/lib/boot/org.jboss.logging.jboss-logging-3.5.0.Final.jar:dependencies/lib/boot/org.jboss.logmanager.jboss-logmanager-embedded-1.0.11.jar:dependencies/lib/boot/org.wildfly.
 common.wildfly-common-1.5.4.Final-format-001.jar:dependencies/lib/main/com.aayushatharva.brotli4j.brotli4j-1.8.0.jar:dependencies/lib/main/com.aayushatharva.brotli4j.native-linux-x86_64-1.8.0.jar:dependencies/lib/main/com.fasterxml.jackson.core.jackson-annotations-2.14.1.jar:dependencies/lib/main/com.fasterxml.jackson.core.jackson-core-2.14.1.jar:dependencies/lib/main/com.fasterxml.jackson.core.jackson-databind-2.14.1.jar:dependencies/lib/main/com.fasterxml.jackson.dataformat.jackson-dataformat-yaml-2.14.1.jar:dependencies/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.14.1.jar:dependencies/lib/main/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.14.1.jar:dependencies/lib/main/com.fasterxml.jackson.module.jackson-module-parameter-names-2.14.1.jar:dependencies/lib/main/com.github.mifmif.generex-1.0.2.jar:dependencies/lib/main/com.squareup.okhttp3.logging-interceptor-3.14.9.jar:dependencies/lib/main/com.squareup.okhttp3.okhttp-3.14.9.jar:dependencies/lib/main
 /com.squareup.okio.okio-1.17.2.jar:dependencies/lib/main/com.sun.activation.jakarta.activation-1.2.1.jar:dependencies/lib/main/dk.brics.automaton.automaton-1.11-8.jar:dependencies/lib/main/io.fabric8.kubernetes-client-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-client-api-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-httpclient-okhttp-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-admissionregistration-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-apiextensions-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-apps-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-autoscaling-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-batch-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-certificates-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-common-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-coordination-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-core-6.3.1
 .jar:dependencies/lib/main/io.fabric8.kubernetes-model-discovery-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-events-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-extensions-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-flowcontrol-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-gatewayapi-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-metrics-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-networking-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-node-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-policy-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-rbac-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-scheduling-6.3.1.jar:dependencies/lib/main/io.fabric8.kubernetes-model-storageclass-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-client-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-client-api-6.3.1.jar:dependencies/lib/main/io.fabric8.open
 shift-model-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-clusterautoscaling-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-config-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-console-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-hive-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-installer-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-machine-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-machineconfig-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-miscellaneous-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-monitoring-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-operator-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-operatorhub-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-storageversionmigrator-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-tuned-6.3.1.jar:dependencies/lib/main/io.fabric8.openshift-model-whereabouts-6
 .3.1.jar:dependencies/lib/main/io.fabric8.zjsonpatch-0.3.0.jar:dependencies/lib/main/io.netty.netty-buffer-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-codec-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-codec-dns-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-codec-haproxy-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-codec-http-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-codec-http2-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-codec-socks-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-common-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-handler-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-handler-proxy-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-resolver-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-resolver-dns-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-transport-4.1.86.Final.jar:dependencies/lib/main/io.netty.netty-transport-native-unix-common-4.1.86.Final.jar:dependencies/lib
 /main/io.quarkus.arc.arc-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-arc-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-core-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-credentials-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-fs-util-0.0.9.jar:dependencies/lib/main/io.quarkus.quarkus-jackson-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-jsonp-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-kubernetes-client-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-kubernetes-client-internal-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-logging-json-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-mutiny-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-netty-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-security-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-security-runtime-spi-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-smallrye-context-propag
 ation-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-smallrye-health-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-vertx-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-vertx-http-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.quarkus-vertx-http-dev-console-runtime-spi-2.16.0.Final.jar:dependencies/lib/main/io.quarkus.security.quarkus-security-1.1.4.Final.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-annotation-1.13.2.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-classloader-1.13.2.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-constraint-1.13.2.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-expression-1.13.2.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-function-1.13.2.jar:dependencies/lib/main/io.smallrye.common.smallrye-common-vertx-context-1.13.2.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-2.13.1.jar:dependencies/lib/main/io.smallrye.config.smallrye-confi
 g-common-2.13.1.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-core-2.13.1.jar:dependencies/lib/main/io.smallrye.config.smallrye-config-source-yaml-2.13.1.jar:dependencies/lib/main/io.smallrye.reactive.mutiny-1.8.0.jar:dependencies/lib/main/io.smallrye.reactive.mutiny-smallrye-context-propagation-1.8.0.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-auth-common-2.30.1.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-bridge-common-2.30.1.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-core-2.30.1.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-runtime-2.30.1.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-uri-template-2.30.1.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-2.30.1.jar:dependencies/lib/main/io.smallrye.reactive.smallrye-mutiny-vertx-web-common-2.30.1.jar:dependencies/lib/main/io.smallrye.reactive.vertx-mutiny-generator-2.30.1.jar
 :dependencies/lib/main/io.smallrye.smallrye-context-propagation-1.2.2.jar:dependencies/lib/main/io.smallrye.smallrye-context-propagation-api-1.2.2.jar:dependencies/lib/main/io.smallrye.smallrye-context-propagation-storage-1.2.2.jar:dependencies/lib/main/io.smallrye.smallrye-fault-tolerance-vertx-5.6.0.jar:dependencies/lib/main/io.smallrye.smallrye-health-3.3.1.jar:dependencies/lib/main/io.smallrye.smallrye-health-api-3.3.1.jar:dependencies/lib/main/io.smallrye.smallrye-health-provided-checks-3.3.1.jar:dependencies/lib/main/io.vertx.vertx-auth-common-4.3.7.jar:dependencies/lib/main/io.vertx.vertx-bridge-common-4.3.7.jar:dependencies/lib/main/io.vertx.vertx-codegen-4.3.7.jar:dependencies/lib/main/io.vertx.vertx-core-4.3.7.jar:dependencies/lib/main/io.vertx.vertx-uri-template-4.3.7.jar:dependencies/lib/main/io.vertx.vertx-web-4.3.7.jar:dependencies/lib/main/io.vertx.vertx-web-common-4.3.7.jar:dependencies/lib/main/jakarta.annotation.jakarta.annotation-api-1.3.5.jar:dependencies/lib/mai
 n/jakarta.el.jakarta.el-api-3.0.3.jar:dependencies/lib/main/jakarta.enterprise.jakarta.enterprise.cdi-api-2.0.2.jar:dependencies/lib/main/jakarta.inject.jakarta.inject-api-1.0.jar:dependencies/lib/main/jakarta.interceptor.jakarta.interceptor-api-1.2.5.jar:dependencies/lib/main/jakarta.transaction.jakarta.transaction-api-1.3.3.jar:dependencies/lib/main/org.apache.camel.camel-api-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-attachments-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-base-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-base-engine-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-bean-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-cloud-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-cluster-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-componentdsl-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-core-catalog-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-core-engine-3.20.1.jar:dependencies/li
 b/main/org.apache.camel.camel-core-languages-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-core-model-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-core-processor-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-core-reifier-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-direct-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-dsl-support-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-endpointdsl-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-health-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-java-joor-dsl-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-kubernetes-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-main-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-management-api-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-microprofile-config-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-microprofile-health-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-platfo
 rm-http-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-platform-http-vertx-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-rest-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-support-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-tooling-model-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-util-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-util-json-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-vertx-common-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-xml-io-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-xml-io-dsl-3.20.1.jar:dependencies/lib/main/org.apache.camel.camel-xml-io-util-3.20.1.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-1.17.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-api-1.17.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-core-support-1.17.0.jar:dependencies/lib/main/org.apache.camel.k.camel-k-runtime-1.17.0.jar:dependencies/lib/main/org.apache.camel
 .quarkus.camel-quarkus-attachments-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-bean-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-core-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-core-cloud-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-direct-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-java-joor-dsl-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-kubernetes-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-microprofile-health-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-platform-http-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-rest-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-support-bouncycastle-2.16.0.jar:dependencies/lib/main/org.apache.camel.quarkus.camel-quarkus-support-commons-logging-2.16.0.jar:dependencies/lib/main/
 org.apache.camel.quarkus.camel-quarkus-xml-io-dsl-2.16.0.jar:dependencies/lib/main/org.apache.commons.commons-compress-1.22.jar:dependencies/lib/main/org.bouncycastle.bcpkix-jdk15on-1.70.jar:dependencies/lib/main/org.bouncycastle.bcprov-jdk15on-1.70.jar:dependencies/lib/main/org.bouncycastle.bcutil-jdk15on-1.70.jar:dependencies/lib/main/org.eclipse.microprofile.config.microprofile-config-api-2.0.1.jar:dependencies/lib/main/org.eclipse.microprofile.context-propagation.microprofile-context-propagation-api-1.2.jar:dependencies/lib/main/org.eclipse.microprofile.health.microprofile-health-api-3.1.jar:dependencies/lib/main/org.javassist.javassist-3.26.0-GA.jar:dependencies/lib/main/org.jboss.logging.commons-logging-jboss-logging-1.0.0.Final.jar:dependencies/lib/main/org.jboss.logging.jboss-logging-annotations-2.2.1.Final.jar:dependencies/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-1.2.0.Final.jar:dependencies/lib/main/org.jboss.spec.javax.xml.bind.jboss-jaxb-api_2.3_spec-2.0.0.Final.j
 ar:dependencies/lib/main/org.jboss.threads.jboss-threads-3.4.3.Final.jar:dependencies/lib/main/org.jooq.joor-0.9.14.jar:dependencies/lib/main/org.reactivestreams.reactive-streams-1.0.3.jar:dependencies/lib/main/org.slf4j.slf4j-api-1.7.36.jar:dependencies/lib/main/org.yaml.snakeyaml-1.33.jar:dependencies/quarkus-app-dependencies.txt:dependencies/quarkus-run.jar:dependencies/quarkus/generated-bytecode.jar:dependencies/quarkus/quarkus-application.dat:dependencies/quarkus/transformed-bytecode.jar io.quarkus.bootstrap.runner.QuarkusEntryPoint
   2023-04-03 21:14:45,394 WARN  [io.qua.net.run.NettyRecorder] (Thread-0) Netty DefaultChannelId initialization (with io.netty.machineId system property set to 74:6c:ed:88:9a:33:9d:68) took more than a second
   2023-04-03 21:14:51,594 INFO  [org.apa.cam.k.Runtime] (main) Apache Camel K Runtime 1.17.0
   2023-04-03 21:14:51,690 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) Bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime
   2023-04-03 21:14:51,790 INFO  [org.apa.cam.mai.MainSupport] (main) Apache Camel (Main) 3.20.1 is starting
   2023-04-03 21:14:52,390 INFO  [org.apa.cam.k.lis.SourcesConfigurer] (main) Loading routes from: SourceDefinition{name='TestOne', language='java', type='source', location='file:/etc/camel/sources/TestOne.java', }
   2023-04-03 21:15:11,390 INFO  [org.apa.cam.k.lis.SourcesConfigurer] (main) Loading routes from: SourceDefinition{name='test-one-openapi', language='xml', type='source', location='file:/etc/camel/sources/test-one-openapi.xml', }
   2023-04-03 21:15:16,585 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 3.20.1 (camel-1) is starting
   2023-04-03 21:15:16,789 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Routes startup (started:4)
   2023-04-03 21:15:16,790 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started mertGet (direct://mertGet)
   2023-04-03 21:15:16,793 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started mertPost (direct://mertPost)
   2023-04-03 21:15:16,794 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started route1 (rest://get:/mert)
   2023-04-03 21:15:16,796 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main)     Started route2 (rest://post:/mert)
   2023-04-03 21:15:16,798 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 3.20.1 (camel-1) started in 2s308ms (build:0ms init:2s96ms start:212ms)
   2023-04-03 21:15:18,696 INFO  [io.quarkus] (main) camel-k-integration 1.12.0 on JVM (powered by Quarkus 2.16.0.Final) started in 55.810s. Listening on: http://0.0.0.0:8080
   2023-04-03 21:15:18,698 INFO  [io.quarkus] (main) Profile prod activated. 
   2023-04-03 21:15:18,699 INFO  [io.quarkus] (main) Installed features: [camel-attachments, camel-bean, camel-core, camel-direct, camel-java-joor-dsl, camel-k-core, camel-k-runtime, camel-kubernetes, camel-microprofile-health, camel-platform-http, camel-rest, camel-xml-io-dsl, cdi, kubernetes-client, security, smallrye-context-propagation, smallrye-health, vertx]
   ```
   
   My integration code is:
   ```
   // camel-k: language=java
   // camel-k: name=test-one
   
   import org.apache.camel.LoggingLevel;
   import org.apache.camel.builder.RouteBuilder;
   
   public class TestOne extends RouteBuilder {
   
       @Override
       public void configure() throws Exception {
   
           onException(Exception.class)
                   .handled(true)
                   .setHeader("CamelHttpResponseCode").constant("400")
                   .setBody().simple("resource:file:/etc/camel/resources/sample-error-response.json")
                   .log(LoggingLevel.ERROR, "exception", "${exception}").routeId("exception");
   
           // GET
           from("direct://mertGet").routeId("mertGet")
                   .log(LoggingLevel.INFO, "log-mertGet", "headers: ${headers}; body: ${body}")
                   .setBody().constant("resource:file:/etc/camel/resources/simple-body.json");
   
           // POST
           from("direct://mertPost").routeId("mertPost")
                   .log(LoggingLevel.INFO, "log-mertPost", "headers: ${headers}; body: ${body}");
       }
   }
   ```
   
   My `kamel run` command is:
   ```
   kamel run \
   --open-api file:./resources/test-one-openapi.yaml \
   --resource file:./resources/sample-error-response.json \
   --resource file:./resources/simple-body.json \
   --trait container.enabled=true \
   --trait container.request-cpu="250m" \
   --trait container.request-memory="256Mi" \
   --trait container.limit-cpu="500m" \
   --trait container.limit-memory="512Mi" \
   --trait health.enabled=true \
   --trait health.liveness-probe-enabled=true \
   --trait health.liveness-scheme="HTTP" \
   --trait health.liveness-initial-delay=0 \
   --trait health.liveness-timeout=60 \
   --trait health.liveness-period=60 \
   --trait health.liveness-success-threshold=1 \
   --trait health.liveness-failure-threshold=3 \
   --trait health.readiness-probe-enabled=true \
   --trait health.readiness-scheme="HTTP" \
   --trait health.readiness-initial-delay=0 \
   --trait health.readiness-timeout=60 \
   --trait health.readiness-period=60 \
   --trait health.readiness-success-threshold=1 \
   --trait health.readiness-failure-threshold=3 \
   TestOne.java
   ```
   
   `test-one-openapi.yaml`:
   ```
   openapi: 3.0.2
   info:
     title: test-one
     version: '1.0'
   servers:
     - url: /
   paths:
     /mert:
       get:
         responses:
           '200':
             content:
               application/json:
                 schema:
                   type: string
             description: default response description
         operationId: mertGet
       post:
         responses:
           '200':
             content:
               application/json:
                 schema:
                   type: string
             description: default response description
         operationId: mertPost
   components: {}%
   ```
   
   Is this behaviour normal? Or is it caused by me using the OpenAPI spec file directly? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] mertdotcc commented on issue #4225: duplicate routeId issue

Posted by "mertdotcc (via GitHub)" <gi...@apache.org>.
mertdotcc commented on issue #4225:
URL: https://github.com/apache/camel-k/issues/4225#issuecomment-1495695128

   Ah okay, I see. I understand the logic and reason behind it. I was just confused personally, having X many routes in my integration but my monitoring dashboard showing me 2X many routes, and I figured that this might be a bit confusing for other end-users as well.
   
   Since this is not an issue per se, closing this. Thanks for the explanation!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] lburgazzoli commented on issue #4225: duplicate routeId issue

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on issue #4225:
URL: https://github.com/apache/camel-k/issues/4225#issuecomment-1495719227

   @mertdotcc note that this could also happen if you use `kamelets` as in fact each kamelet instance is a route 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] lburgazzoli commented on issue #4225: duplicate routeId issue

Posted by "lburgazzoli (via GitHub)" <gi...@apache.org>.
lburgazzoli commented on issue #4225:
URL: https://github.com/apache/camel-k/issues/4225#issuecomment-1495061506

   Yes it is expected.
   When camel-k process the openapi definition, it generates some routes for you, like:
   
   ```java
   from("platform-http:/mert?method=GET")
       .to("direct:mertGet")
   from("platform-http:/mert?method=POST")
       .to("direct:mertPost")
   ```
   
   Then you use that `direct` endpoints to  wire your logic to the http handler.
   
   You can look at the generate code to have some better detail about what is generated. ((it is one of the configmap mounted to the integration pod) 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] mertdotcc closed issue #4225: duplicate routeId issue

Posted by "mertdotcc (via GitHub)" <gi...@apache.org>.
mertdotcc closed issue #4225: duplicate routeId issue
URL: https://github.com/apache/camel-k/issues/4225


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org