CAMEL-23544: Fix null fromRouteId and endpoint tracking for delegating consumers (platform-http)#23286
Closed
davsclaus wants to merge 1 commit into
Closed
Conversation
…g consumers DefaultPlatformHttpConsumer creates its nested VertxPlatformHttpConsumer in doInit(), which runs before RouteService.doSetup() calls setRouteId() on the outer consumer. The nested consumer never received the route ID, causing exchanges to carry a null fromRouteId and TOTAL counts to show 0 in endpoint statistics. Fix: override setRouteId() in DefaultPlatformHttpConsumer to propagate the route ID to the nested consumer whenever it is set. DefaultRuntimeEndpointRegistry now also tracks the consumer's endpoint URI in the inputs map when it differs from the route's logical endpoint URI (e.g. rest-openapi -> platform-http). Both RouteAddedEvent (adds consumer URI to inputs) and RouteRemovedEvent (removes from inputUtilization) are updated. The ExchangeCreatedEvent handler retains a defensive null-routeId fallback scan for any other delegating component. Introduce SyntheticBacklogTracer (extends BacklogTracer) as a new SPI for components that process exchanges inline and bypass the route pipeline (e.g. rest-openapi mock mode). It exposes traceFirstNode/traceLastNode so those components can participate in message-history capture without relying on CamelInternalProcessor. BacklogTracer impl now implements this interface. DefaultRestOpenapiProcessorStrategy uses it to emit synthetic trace events around mock responses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
oscerd
approved these changes
May 18, 2026
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Contributor
Author
|
Closing — all changes from this PR have been incorporated into the feat/camel-tui branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DefaultPlatformHttpConsumer: overridesetRouteId()to propagate the route ID to the nestedVertxPlatformHttpConsumer. Previously, the nested consumer was created indoInit()beforeRouteService.doSetup()calledsetRouteId()on the outer consumer, so exchanges carried a nullfromRouteIdand endpoint TOTAL counts showed 0.DefaultRuntimeEndpointRegistry: track the consumer's endpoint URI in theinputsmap when it differs from the route's logical endpoint URI (e.g.rest-openapi://...→platform-http:///path).RouteAddedEventnow adds both URIs;RouteRemovedEventremoves both frominputUtilization. TheExchangeCreatedEventhandler keeps a defensive null-routeIdfallback scan for other delegating components.SyntheticBacklogTracerSPI (new): extendsBacklogTracerwithtraceFirstNode/traceLastNodefor components that process exchanges inline and bypass the route pipeline (e.g. rest-openapi mock mode).BacklogTracerimpl now implements this interface.DefaultRestOpenapiProcessorStrategyuses it to emit synthetic first/last trace events so mock responses participate in message-history capture.Test plan
DefaultRuntimeEndpointRegistryexisting tests passBacklogTracerexisting tests passClaude Code on behalf of Claus Ibsen