davsclaus commented on code in PR #18552:
URL: https://github.com/apache/camel/pull/18552#discussion_r2190720875


##########
core/camel-core-reifier/src/main/java/org/apache/camel/reifier/InterceptFromReifier.java:
##########
@@ -42,7 +42,11 @@ public Processor createProcessor() throws Exception {
             when = e -> true;
         }
         // set property before processing the child
+
         Processor p = exchange -> {
+            
exchange.setProperty(ExchangePropertyKey.INTERCEPTED_ROUTE_ID.getName(), 
route.getId());

Review Comment:
   Use the key parameter directly so you dont need to do .getName - the former 
is faster



##########
core/camel-api/src/main/java/org/apache/camel/ExchangePropertyKey.java:
##########
@@ -57,6 +57,9 @@ public enum ExchangePropertyKey {
     FILE_EXCHANGE_FILE(Exchange.FILE_EXCHANGE_FILE),
     GROUPED_EXCHANGE(Exchange.GROUPED_EXCHANGE),
     INTERCEPTED_ENDPOINT(Exchange.INTERCEPTED_ENDPOINT),
+    INTERCEPTED_ENDPOINT_URI("InterceptedEndpointUri"),

Review Comment:
   These should be new Exchange.XXX like the others and start with CamelXXX so 
we know its from Camel. Look at one of the others and see as its needed in some 
code mapping between exchange and this key class



##########
core/camel-core-reifier/src/main/java/org/apache/camel/reifier/InterceptReifier.java:
##########
@@ -61,11 +62,20 @@ public Processor wrapProcessorInInterceptors(
                 // store the target we are intercepting
                 this.interceptedTarget = target;
 
+                Processor p = exchange -> {
+                    
exchange.setProperty(ExchangePropertyKey.INTERCEPTED_ROUTE_ID.getName(),
+                            definition.getParent() != null ? 
definition.getParent().getId() : route.getRouteId());

Review Comment:
   There is some helper code to get the route id in `ProcessorDefinitionHelper`



-- 
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