You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2019/10/29 22:13:03 UTC

[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #348: Fix #220 platform-http component should return 204 for success and no…

lburgazzoli commented on a change in pull request #348: Fix #220 platform-http component should return 204 for success and no…
URL: https://github.com/apache/camel-quarkus/pull/348#discussion_r340350906
 
 

 ##########
 File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java
 ##########
 @@ -111,13 +111,18 @@ protected void doStart() throws Exception {
 
         newRoute.handler(
             ctx -> {
+                final Exchange exchange = toExchange(ctx);
                 try {
-                    final Exchange e = toExchange(ctx);
-                    getProcessor().process(e);
-                    writeResponse(ctx, e, getEndpoint().getHeaderFilterStrategy());
+                    createUoW(exchange);
+                    getAsyncProcessor().process(
+                        exchange,
+                        doneSync -> writeResponse(ctx, exchange, getEndpoint().getHeaderFilterStrategy())
+                    );
                 } catch (Exception e) {
                     LOG.debugf(e, "Could not handle '%s'", path);
                     ctx.fail(e);
 
 Review comment:
   You may need to do something like: `getExceptionHandler().handleException(e)` like https://github.com/apache/camel/blob/master/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java#L171

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services