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


##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientProducer.java:
##########
@@ -91,7 +92,13 @@ public boolean process(Exchange exchange, AsyncCallback 
async) {
         final Boolean await = msg.getHeader(MiloConstants.HEADER_AWAIT, 
this.defaultAwaitWrites, Boolean.class);
 
         if (TRUE.equals(await)) {
-            future.whenComplete((v, ex) -> async.done(false));
+            future.whenComplete((o, throwable) -> {
+                        final DefaultMessage newMessage = new 
DefaultMessage(exchange);

Review Comment:
   I dont think you need to set a new message as this leads to loosing headers 
and whatnot.
   
   You usually just set the result directly on the message, eg
   
   exchange.getMessage().setBody(...)
   



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