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

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


The following commit(s) were added to refs/heads/main by this push:
     new ec556bdfd67 CAMEL-18858: camel-kamelet - Create a copy of exchange 
when kamelet is acting as source, so the exchange is faked to be created 
directly by the consumer itself, so it originate from the user route, and make 
the kamelet as it was just like any other regular Camel component. (#13310)
ec556bdfd67 is described below

commit ec556bdfd67ddf7fc085b59b2ef8ebf0d7fe164c
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Feb 27 08:56:57 2024 +0100

    CAMEL-18858: camel-kamelet - Create a copy of exchange when kamelet is 
acting as source, so the exchange is faked to be created directly by the 
consumer itself, so it originate from the user route, and make the kamelet as 
it was just like any other regular Camel component. (#13310)
---
 .../main/java/org/apache/camel/component/kamelet/KameletProducer.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
index 68f6a734f77..38d291a8fcd 100644
--- 
a/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
+++ 
b/components/camel-kamelet/src/main/java/org/apache/camel/component/kamelet/KameletProducer.java
@@ -102,7 +102,7 @@ final class KameletProducer extends DefaultAsyncProducer 
implements RouteIdAware
                 } else {
                     // kamelet producer that calls its kamelet consumer to 
process the incoming exchange
                     // create exchange copy to let a new lifecycle originate 
from the calling route (not the kamelet route)
-                    final Exchange copy = 
ExchangeHelper.createCorrelatedCopy(exchange, true, true);
+                    final Exchange copy = 
ExchangeHelper.createCorrelatedCopy(exchange, false, true);
                     // fake copy as being created by the consumer
                     
copy.getExchangeExtension().setFromEndpoint(consumer.getEndpoint());
                     
copy.getExchangeExtension().setFromRouteId(consumer.getRouteId());

Reply via email to