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

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

commit dad622e934c670ecd1c8e63912666311d5c45441
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon May 18 13:20:31 2026 +0200

    DefaultRuntimeEndpointRegistry: dynamically add consumer URI to inputs on 
first exchange
    
    The RouteAddedEvent approach to pre-populate inputs with the consumer URI 
could
    fail due to timing or URI format mismatches. Instead, add the URI to inputs
    inside the ExchangeCreatedEvent handler itself — the same URI that records 
the
    hit is guaranteed to be the one looked up in getEndpointStatistics(), so
    platform-http hit counts always surface correctly in the endpoint tab TOTAL.
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
 .../apache/camel/impl/engine/DefaultRuntimeEndpointRegistry.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRuntimeEndpointRegistry.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRuntimeEndpointRegistry.java
index 456013e2d646..6598fab2c9a6 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRuntimeEndpointRegistry.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRuntimeEndpointRegistry.java
@@ -260,6 +260,13 @@ public class DefaultRuntimeEndpointRegistry extends 
EventNotifierSupport impleme
             if (endpoint != null) {
                 String routeId = ece.getExchange().getFromRouteId();
                 String uri = endpoint.getEndpointUri();
+                // ensure the actual consumer URI is in inputs so 
getEndpointStatistics() can find it;
+                // some components (e.g. rest-openapi) delegate to an 
underlying consumer (e.g. platform-http)
+                // whose endpoint URI differs from the route's logical 
endpoint URI
+                Set<String> routeInputs = inputs.get(routeId);
+                if (routeInputs != null) {
+                    routeInputs.add(uri);
+                }
                 String key = asUtilizationKey(routeId, uri);
                 if (key != null) {
                     inputUtilization.onHit(key);

Reply via email to