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

jiriondrusek pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/camel-main by this push:
     new f4aa90691c Correct fix of VertxPlatformHttpRouter name
f4aa90691c is described below

commit f4aa90691c05538a69734661fb82020c4901ac99
Author: Jiri Ondrusek <[email protected]>
AuthorDate: Tue Apr 29 09:31:04 2025 +0200

    Correct fix of VertxPlatformHttpRouter name
---
 .../component/platform/http/deployment/PlatformHttpProcessor.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java
 
b/extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java
index 824deff048..20913c13bf 100644
--- 
a/extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java
+++ 
b/extensions/platform-http/deployment/src/main/java/org/apache/camel/quarkus/component/platform/http/deployment/PlatformHttpProcessor.java
@@ -32,6 +32,8 @@ import 
org.apache.camel.quarkus.component.platform.http.runtime.PlatformHttpReco
 import org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem;
 import org.apache.camel.quarkus.core.deployment.spi.CamelServiceFilter;
 import 
org.apache.camel.quarkus.core.deployment.spi.CamelServiceFilterBuildItem;
+import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.ConfigProvider;
 
 class PlatformHttpProcessor {
     private static final String FEATURE = "camel-platform-http";
@@ -71,11 +73,13 @@ class PlatformHttpProcessor {
             VertxWebRouterBuildItem router,
             BodyHandlerBuildItem bodyHandler,
             PlatformHttpRecorder recorder) {
+        Config config = ConfigProvider.getConfig();
+        var port = config.getOptionalValue("quarkus.http.port", 
Integer.class).orElse(8080);
         return new CamelRuntimeBeanBuildItem(
-                VertxPlatformHttpRouter.PLATFORM_HTTP_ROUTER_NAME,
+                VertxPlatformHttpRouter.getRouterNameFromPort(port),
                 Router.class.getName(),
                 recorder.createVertxPlatformHttpRouter(vertx.getVertx(), 
router.getHttpRouter(), bodyHandler.getHandler(),
-                        VertxPlatformHttpRouter.PLATFORM_HTTP_ROUTER_NAME));
+                        String.valueOf(port)));
     }
 
     @Record(ExecutionTime.RUNTIME_INIT)

Reply via email to