davsclaus commented on code in PR #25492:
URL: https://github.com/apache/camel/pull/25492#discussion_r3782100547
##########
core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/CamelInternalProcessor.java:
##########
@@ -644,6 +644,11 @@ public void setRoute(Route route) {
@Override
public DefaultBacklogTracerEventMessage before(Exchange exchange)
throws Exception {
if (!skip && backlogTracer.shouldTrace(routeDefinition.getInput(),
exchange)) {
+ if (route != null &&
Boolean.TRUE.equals(route.isStreamCaching())) {
+ StreamCachingHelper.convertToStreamCache(
+ camelContext.getStreamCachingStrategy(), exchange,
exchange.getIn());
+ }
Review Comment:
This embeds stream caching logic inside the tracer advice, coupling two
unrelated concerns.
At the channel level, `StreamCachingAdvice` already solves this correctly
via `Ordered.HIGHEST` — it sorts before tracing/debugging advices
automatically. The route level should follow the same pattern: add
`StreamCachingAdvice` in `addRouteLifecycleAdvice()` when stream caching is
enabled on the route, and let the `Ordered` sorting place it before
`BacklogTracerRouteAdvice`.
This way, stream caching runs first at both route and channel level,
consistently.
--
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]