gnodet-bot commented on code in PR #31128:
URL: https://github.com/apache/camel/pull/31128#discussion_r4740744859


##########
core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java:
##########
@@ -854,6 +854,12 @@ public DefaultBacklogTracerEventMessage before(Exchange 
exchange) throws Excepti
                     first.setEndpointServiceProtocol(esl.getServiceProtocol());
                     first.setEndpointServiceMetadata(esl.getServiceMetadata());
                 }
+                // the message history begins at the first traced route of an 
exchange, which is this one when the
+                // route the exchange came from is not traced (such as a rest 
or template route the tracer skips)

Review Comment:
   The `isMessageHistory()` guard is not needed here. `fromUntracedRoute` is a 
`BacklogTracer`-only concern — it has nothing to do with the message history 
feature.
   
   When backlog tracing is enabled but message history is disabled, this 
condition never fires, so exchanges from untraced routes silently fail 
`isExchangeStart()` and never begin a history. The existing tests all set 
`setMessageHistory(true)`, so this case is not covered.
   
   ```suggestion
                   if (fromRouteId != null && !fromRouteId.equals(routeId)
                           && !backlogTracer.isRouteTraced(fromRouteId)) {
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to