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 2021/05/11 17:32:30 UTC

[GitHub] [camel-quarkus] ppalaga opened a new pull request #2581: Support @EndpointInject and @Produce

ppalaga opened a new pull request #2581:
URL: https://github.com/apache/camel-quarkus/pull/2581


   Fix #2539


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



[GitHub] [camel-quarkus] ppalaga merged pull request #2581: Support @EndpointInject and @Produce

Posted by GitBox <gi...@apache.org>.
ppalaga merged pull request #2581:
URL: https://github.com/apache/camel-quarkus/pull/2581


   


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



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #2581: Support @EndpointInject and @Produce

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #2581:
URL: https://github.com/apache/camel-quarkus/pull/2581#discussion_r630984007



##########
File path: integration-tests/bean/src/main/java/org/apache/camel/quarkus/component/bean/BeanResource.java
##########
@@ -142,4 +142,27 @@ public String parameterBindingAnnotations(String statement, @PathParam("greeting
                 String.class);
     }
 
+    @Path("/produceInterface")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public String produceInterface(String payload) {
+        produceInterface.sayHello(payload);

Review comment:
       Couldn't we simply `return produceInterface.sayHello(payload);` as this is direct under the hood ?




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



[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #2581: Support @EndpointInject and @Produce

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #2581:
URL: https://github.com/apache/camel-quarkus/pull/2581#discussion_r630993858



##########
File path: integration-tests/bean/src/main/java/org/apache/camel/quarkus/component/bean/BeanResource.java
##########
@@ -142,4 +142,27 @@ public String parameterBindingAnnotations(String statement, @PathParam("greeting
                 String.class);
     }
 
+    @Path("/produceInterface")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public String produceInterface(String payload) {
+        produceInterface.sayHello(payload);

Review comment:
       Hm... you made me thinking. The purpose of the test is to make sure that the message goes via the Camel route starting with `direct:produceInterface`. Would there be any certainty if we just returned `sayHello(payload)`? I guess yes, but to be really sure, we'd have to add some transformation of the message to the route so that we see that it really passed it.

##########
File path: integration-tests/bean/src/main/java/org/apache/camel/quarkus/component/bean/BeanResource.java
##########
@@ -142,4 +142,27 @@ public String parameterBindingAnnotations(String statement, @PathParam("greeting
                 String.class);
     }
 
+    @Path("/produceInterface")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public String produceInterface(String payload) {
+        produceInterface.sayHello(payload);

Review comment:
       I can try it in the next iteration, when implementing `@Consume`




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



[GitHub] [camel-quarkus] ppalaga commented on pull request #2581: Support @EndpointInject and @Produce

Posted by GitBox <gi...@apache.org>.
ppalaga commented on pull request #2581:
URL: https://github.com/apache/camel-quarkus/pull/2581#issuecomment-839590688


   da0060b fixed the test failing due to using a bad class loader at build time.


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



[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #2581: Support @EndpointInject and @Produce

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #2581:
URL: https://github.com/apache/camel-quarkus/pull/2581#discussion_r631375642



##########
File path: integration-tests/bean/src/main/java/org/apache/camel/quarkus/component/bean/BeanResource.java
##########
@@ -142,4 +142,27 @@ public String parameterBindingAnnotations(String statement, @PathParam("greeting
                 String.class);
     }
 
+    @Path("/produceInterface")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public String produceInterface(String payload) {
+        produceInterface.sayHello(payload);

Review comment:
       I have added a commit in https://github.com/apache/camel-quarkus/pull/2586 implementing your proposal, @aldettinger. Thanks for suggesting it!




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