[GitHub] [camel-k-runtime] WillemJiang commented on issue #138: #137 Add the error log when setting component property failed
WillemJiang commented on issue #138: #137 Add the error log when setting component property failed URL: https://github.com/apache/camel-k-runtime/pull/138#issuecomment-531442837 > thinking a little bit more about this we may throw something like > > ``` > new PropertyBindingException(this.component, name, "") > ``` > > as the Missing*Exception have some special meaning so they are not propagated @lburgazzoli I checked the code of [PropertyBindingException](http://docs.groovy-lang.org/latest/html/api/groovy/lang/MissingPropertyException.html) code, the default getMessage implementation (which has the location text) is much better than the String message that I can feed in. So I prefer to use new PropertyBindingException(this.component, name) one. What do you think about 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #199: Camel jira
asf-ci commented on issue #199: Camel jira URL: https://github.com/apache/camel-quarkus/pull/199#issuecomment-531424165 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/160/Build result: FAILURE[...truncated 673.83 KB...]at java.lang.reflect.Method.invoke (Method.java:498)at hudson.maven.Maven3Builder.call (Maven3Builder.java:139)at hudson.maven.Maven3Builder.call (Maven3Builder.java:70)at hudson.remoting.UserRequest.perform (UserRequest.java:212)at hudson.remoting.UserRequest.perform (UserRequest.java:54)at hudson.remoting.Request$2.run (Request.java:369)at hudson.remoting.InterceptingExecutorService$1.call (InterceptingExecutorService.java:72)at java.util.concurrent.FutureTask.run (FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)at java.lang.Thread.run (Thread.java:748)[ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :camel-quarkus-integration-test-jirachannel stoppedAdding one-line test results to commit status...Setting status of d7e5d0a14f5ec00ad2e8eec1ea49e108f9f0bece to FAILURE with url https://builds.apache.org/job/camel-quarkus-pr/160/ and message: 'FAILURE 73 tests run, 2 skipped, 0 failed.'Using context: default 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ffang commented on issue #199: Camel jira
ffang commented on issue #199: Camel jira URL: https://github.com/apache/camel-quarkus/pull/199#issuecomment-531413290 native build can make some progress, but I still see error like `com.oracle.svm.core.util.UserError$UserException: No instances are allowed in the image heap for a class that is initialized or reinitialized at image runtime: sun.security.provider.NativePRNG. Try marking this class for build-time initialization with --initialize-at-build-time=sun.security.provider.NativePRNG Detailed message: Trace: object java.security.SecureRandom method com.google.api.client.auth.oauth.OAuthParameters.computeNonce() Call path from entry point to com.google.api.client.auth.oauth.OAuthParameters.computeNonce(): at com.google.api.client.auth.oauth.OAuthParameters.computeNonce(OAuthParameters.java:120) at org.apache.camel.component.jira.oauth.JiraOAuthAuthenticationHandler.configure(JiraOAuthAuthenticationHandler.java:62) ` If add --initialize-at-build-time=sun.security.provider.NativePRNG as the error message indicate, I got another error like ` Error: Incompatible change of initialization policy for sun.security.provider.NativePRNG: trying to change BUILD_TIME from the command line to RERUN for substitutions com.oracle.svm.core.util.UserError$UserException: Incompatible change of initialization policy for sun.security.provider.NativePRNG: trying to change BUILD_TIME from the command line to RERUN for substitutions ` 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #201: Fix #184 Leverage platform http service
asf-ci commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-531413077 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/159/Failed Tests: 1camel-quarkus-pr/org.apache.camel.quarkus:camel-quarkus-integration-test-platform-http: 1org.apache.camel.quarkus.component.http.server.it.PlatformHttpIT.test 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #201: Fix #184 Leverage platform http service
asf-ci commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-531397519 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/158/Failed Tests: 1camel-quarkus-pr/org.apache.camel.quarkus:camel-quarkus-integration-test-platform-http: 1org.apache.camel.quarkus.component.http.server.it.PlatformHttpIT.test 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #201: Fix #184 Leverage platform http service
asf-ci commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-531371801 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/157/Build result: FAILURE[...truncated 680.15 KB...]at java.lang.reflect.Method.invoke (Method.java:498)at hudson.maven.Maven3Builder.call (Maven3Builder.java:139)at hudson.maven.Maven3Builder.call (Maven3Builder.java:70)at hudson.remoting.UserRequest.perform (UserRequest.java:212)at hudson.remoting.UserRequest.perform (UserRequest.java:54)at hudson.remoting.Request$2.run (Request.java:369)at hudson.remoting.InterceptingExecutorService$1.call (InterceptingExecutorService.java:72)at java.util.concurrent.FutureTask.run (FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)at java.lang.Thread.run (Thread.java:748)[ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :camel-quarkus-integration-test-platform-httpchannel stoppedAdding one-line test results to commit status...Setting status of d4c5a942ed7566aa46efc2c4d1f4d49428a9f924 to FAILURE with url https://builds.apache.org/job/camel-quarkus-pr/157/ and message: 'FAILURE 73 tests run, 2 skipped, 0 failed.'Using context: default 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on issue #201: Fix #184 Leverage platform http service
ppalaga commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-531369582 bdaeb18 adds the mojos to the component module. I still have to figure out why the native test is timing out. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on issue #201: Fix #184 Leverage platform http service
ppalaga commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-531364334 39fcf89715a847d28f4e53e6f0f20734608710f2 : Addressed most of the points by @lburgazzoli . The native mode test is timing out saying `Unable to start native image in 60s` which I saw in the past and solved by adding a dependency on `quarkus-undertow`. Not sure what should be the solution here. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324336543 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/http/server/QuarkusPlatformHttpEngine.java ## @@ -0,0 +1,317 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.http.server; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Inject; +import javax.inject.Named; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; + +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.http.server.PlatformHttpConstants; +import org.apache.camel.component.http.server.spi.HttpEndpointSpec; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.component.http.server.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.jboss.logging.Logger; + +@ApplicationScoped +@Named(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME) +public class QuarkusPlatformHttpEngine implements PlatformHttpEngine { Review comment: I did not think there is any difference, but after some testing, I now see there is one. Thanks for the hint! 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324336074 ## File path: extensions/platform-http/component/pom.xml ## @@ -0,0 +1,57 @@ + + +http://maven.apache.org/POM/4.0.0; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +4.0.0 + +org.apache.camel.quarkus +camel-quarkus-platform-http-parent +0.1.1-SNAPSHOT +../pom.xml + + +camel-quarkus-platform-http-component +Camel Quarkus :: Platform HTTP :: Component + + + + +org.apache.camel.quarkus +camel-quarkus-bom +${project.version} +pom +import + + + + + + +org.apache.camel +camel-support + + +org.apache.camel +spi-annotations + + Review comment: I looked into Camel main repo and I cannot say I understand which mojos are necessary. I vote to follow up on this later. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324335692 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpConsumer.java ## @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Set; + +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.ExchangePattern; +import org.apache.camel.Processor; +import org.apache.camel.component.http.server.spi.HttpEndpointSpec; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.component.http.server.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; + +public class PlatformHttpConsumer extends DefaultConsumer implements HttpEndpointSpec { + +public PlatformHttpConsumer(Endpoint endpoint, Processor processor) { +super(endpoint, processor); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); +final PlatformHttpEngine platformHttpEngine = getEndpoint().getCamelContext().getRegistry() + .lookupByNameAndType(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME, PlatformHttpEngine.class); +platformHttpEngine.deploy(this); Review comment: Done in QuarkusPlatformHttpConsumer 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324335567 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpConsumer.java ## @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Set; + +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.ExchangePattern; +import org.apache.camel.Processor; +import org.apache.camel.component.http.server.spi.HttpEndpointSpec; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.component.http.server.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; + +public class PlatformHttpConsumer extends DefaultConsumer implements HttpEndpointSpec { Review comment: `HttpEndpointSpec` is gone, but `QuarkusPlatformHttpConsumer` is still needed IMO. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324335301 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpComponent.java ## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.support.DefaultComponent; + +public class PlatformHttpComponent extends DefaultComponent { + +public PlatformHttpComponent() { +super(); +} + +public PlatformHttpComponent(CamelContext context) { +super(context); +} + +@Override +protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception { +final String[] remainingParts = remaining.split(":"); +if (remainingParts.length != 2) { +throw new IllegalArgumentException("Expected two segments delimited by ':'; found " + remaining); +} +final Set methods = Method.parseList(remainingParts[0]); +final String path = remainingParts[1]; +return new PlatformHttpEndpoint(uri, this, methods, path); +} + Review comment: Done, thanks. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324335090 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpEndpoint.java ## @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Set; + +import org.apache.camel.AsyncEndpoint; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.spi.HeaderFilterStrategyAware; +import org.apache.camel.spi.UriParam; +import org.apache.camel.support.DefaultEndpoint; + +public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware { Review comment: Thanks, I added some, plz re-check. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324335215 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpComponent.java ## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.support.DefaultComponent; + +public class PlatformHttpComponent extends DefaultComponent { Review comment: Done, thanks. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324334899 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/spi/PlatformHttpEngine.java ## @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server.spi; + +/** + * An abstraction of an HTTP Server engine on which HTTP endpoints can be deployed. + */ +public interface PlatformHttpEngine { + +/** + * Deploys the given {@link HttpEndpointSpec} on this {@link PlatformHttpEngine} + * + * @param spec the {@link HttpEndpointSpec} to deploy + */ +void deploy(HttpEndpointSpec spec); Review comment: I tried to provide a simple and hard to break interface for the implementors because I tend to mistrust camel model as fragile due to its mutability and overused inheritance. You are right it can be done like you say and it might feel more natural to camelists so I followed your wish. `QuarkusPlatformHttpConsumer` now also takes care for the stop, suspend and resume. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324263195 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/spi/Method.java ## @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server.spi; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Locale; +import java.util.Set; +import java.util.TreeSet; + +/** + * An HTTP method. + */ +public enum Method { Review comment: > depending on `camel-http-common` and excluding the servlet ... does not work ootb, because some converters auto-loaded by http-common depend on servlet ``` org.junit.jupiter.api.extension.TestInstantiationException: TestInstanceFactory [io.quarkus.test.junit.QuarkusTestExtension] failed to instantiate test class [org.apache.camel.quarkus.component.http.server.it.PlatformHttpTest] at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstanceFactory(ClassBasedTestDescriptor.java:298) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:273) at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:70) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:256) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:250) at java.util.Optional.orElseGet(Optional.java:267) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:249) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:29) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:107) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:107) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:75) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at java.util.ArrayList.forEach(ArrayList.java:1257) at
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324288580 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpComponent.java ## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.support.DefaultComponent; + +public class PlatformHttpComponent extends DefaultComponent { + +public PlatformHttpComponent() { +super(); +} + +public PlatformHttpComponent(CamelContext context) { +super(context); +} + +@Override +protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception { +final String[] remainingParts = remaining.split(":"); +if (remainingParts.length != 2) { +throw new IllegalArgumentException("Expected two segments delimited by ':'; found " + remaining); +} +final Set methods = Method.parseList(remainingParts[0]); +final String path = remainingParts[1]; +return new PlatformHttpEndpoint(uri, this, methods, path); Review comment: Let's allow methods before the path and also as an uriParam to have both good ergonomy and compatibilty with the older components. So all of the following variants would yeld the same result: ``` platform-http:/path?httpMethodRestrict=GET,POST platform-http:GET:/path?httpMethodRestrict=POST platform-http:GET,POST:/path ``` 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324280445 ## File path: extensions/platform-http/component/pom.xml ## @@ -0,0 +1,57 @@ + + +http://maven.apache.org/POM/4.0.0; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +4.0.0 + +org.apache.camel.quarkus +camel-quarkus-platform-http-parent +0.1.1-SNAPSHOT +../pom.xml + + +camel-quarkus-platform-http-component +Camel Quarkus :: Platform HTTP :: Component + + + + +org.apache.camel.quarkus +camel-quarkus-bom +${project.version} +pom +import + + + + + + +org.apache.camel +camel-support + + +org.apache.camel +spi-annotations + + Review comment: Do we need those while the component is hosted here? 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] bfitzpat closed issue #937: Monitoring kubectl for changes to integrations misses transition to error state
bfitzpat closed issue #937: Monitoring kubectl for changes to integrations misses transition to error state URL: https://github.com/apache/camel-k/issues/937 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] bfitzpat commented on issue #937: Monitoring kubectl for changes to integrations misses transition to error state
bfitzpat commented on issue #937: Monitoring kubectl for changes to integrations misses transition to error state URL: https://github.com/apache/camel-k/issues/937#issuecomment-531296435 Actually it was a watch timeout issue on my side, not the same issue as #906 - worked around the timeout and now we see it transition from Building Kit to Error eventually. Closing. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] lburgazzoli closed issue #906: Dev mode doesn't show if the build failed
lburgazzoli closed issue #906: Dev mode doesn't show if the build failed URL: https://github.com/apache/camel-k/issues/906 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] lburgazzoli merged pull request #927: fix: Dev mode does not show if the build failed
lburgazzoli merged pull request #927: fix: Dev mode does not show if the build failed URL: https://github.com/apache/camel-k/pull/927 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] bfitzpat commented on issue #937: Monitoring kubectl for changes to integrations misses transition to error state
bfitzpat commented on issue #937: Monitoring kubectl for changes to integrations misses transition to error state URL: https://github.com/apache/camel-k/issues/937#issuecomment-531283549 Looks like the same issue is being seen here - https://github.com/apache/camel-k/issues/906 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] bfitzpat commented on issue #937: Monitoring kubectl for changes to integrations misses transition to error state
bfitzpat commented on issue #937: Monitoring kubectl for changes to integrations misses transition to error state URL: https://github.com/apache/camel-k/issues/937#issuecomment-531280065 Looks like "kubectl get" has a timeout as well. If nothing in the system changes after a few seconds, the thread is shut down. Not sure if there's a way to keep that alive indefinitely while the tooling is running? 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] bfitzpat opened a new issue #937: Monitoring kubectl for changes to integrations misses transition to error state
bfitzpat opened a new issue #937: Monitoring kubectl for changes to integrations misses transition to error state URL: https://github.com/apache/camel-k/issues/937 So I've started looking at auto-refresh in the tooling and hit upon a fun little issue. If I use "kubectl get integrations -w" to watch for changes to running integrations, I am finding that starting new integrations works great if they work all the way through Building Kit into Running but I'm not getting notified when things go from Building Kit to Error. Is that a bug by chance? Will there eventually be some additional kamel cli-based health/updates that we can monitor in a similar way? 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324218757 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/http/server/QuarkusPlatformHttpEngine.java ## @@ -0,0 +1,317 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.http.server; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Inject; +import javax.inject.Named; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; + +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.http.server.PlatformHttpConstants; +import org.apache.camel.component.http.server.spi.HttpEndpointSpec; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.component.http.server.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.jboss.logging.Logger; + +@ApplicationScoped +@Named(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME) +public class QuarkusPlatformHttpEngine implements PlatformHttpEngine { Review comment: it's an optimization thing as you can record the wiring and at runtime you do not need to involve ArC. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r32413 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/spi/Method.java ## @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server.spi; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Locale; +import java.util.Set; +import java.util.TreeSet; + +/** + * An HTTP method. + */ +public enum Method { Review comment: Actually, depending on `camel-http-common` and excluding the servlet could be an option. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] oscerd merged pull request #936: fix(examples): Remove timer route to allow scale-to-zero of REST DSL example
oscerd merged pull request #936: fix(examples): Remove timer route to allow scale-to-zero of REST DSL example URL: https://github.com/apache/camel-k/pull/936 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-website] zregvart merged pull request #87: fix: update wrong mailing list information
zregvart merged pull request #87: fix: update wrong mailing list information URL: https://github.com/apache/camel-website/pull/87 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324184251 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpComponent.java ## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.support.DefaultComponent; + +public class PlatformHttpComponent extends DefaultComponent { + +public PlatformHttpComponent() { +super(); +} + +public PlatformHttpComponent(CamelContext context) { +super(context); +} + +@Override +protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception { +final String[] remainingParts = remaining.split(":"); +if (remainingParts.length != 2) { +throw new IllegalArgumentException("Expected two segments delimited by ':'; found " + remaining); +} +final Set methods = Method.parseList(remainingParts[0]); +final String path = remainingParts[1]; +return new PlatformHttpEndpoint(uri, this, methods, path); Review comment: You propose more typing but less learning for those who know the older Camel components. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324181915 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/http/server/QuarkusPlatformHttpEngine.java ## @@ -0,0 +1,317 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.http.server; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Inject; +import javax.inject.Named; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; + +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.http.server.PlatformHttpConstants; +import org.apache.camel.component.http.server.spi.HttpEndpointSpec; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.component.http.server.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.jboss.logging.Logger; + +@ApplicationScoped +@Named(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME) +public class QuarkusPlatformHttpEngine implements PlatformHttpEngine { Review comment: Why is wiring with build steps better? 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service
ppalaga commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324181581 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/spi/Method.java ## @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server.spi; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Locale; +import java.util.Set; +import java.util.TreeSet; + +/** + * An HTTP method. + */ +public enum Method { Review comment: Yeah, `camel-http-common` currently depends on servlet, which we definitely do not want here. Splitting it and depending on the servlet-less part might be an option. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-k] astefanutti opened a new pull request #936: fix(examples): Remove timer route to allow scale-to-zero of REST DSL example
astefanutti opened a new pull request #936: fix(examples): Remove timer route to allow scale-to-zero of REST DSL example URL: https://github.com/apache/camel-k/pull/936 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324161202 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpEndpoint.java ## @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Set; + +import org.apache.camel.AsyncEndpoint; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.spi.HeaderFilterStrategyAware; +import org.apache.camel.spi.UriParam; +import org.apache.camel.support.DefaultEndpoint; + +public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware { Review comment: It lacks all the annotations camel requires for an endpoint 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324164804 ## File path: extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/http/server/QuarkusPlatformHttpEngine.java ## @@ -0,0 +1,317 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.http.server; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Inject; +import javax.inject.Named; + +import io.vertx.core.MultiMap; +import io.vertx.core.buffer.Buffer; +import io.vertx.core.http.HttpMethod; +import io.vertx.core.http.HttpServerRequest; +import io.vertx.core.http.HttpServerResponse; +import io.vertx.ext.web.Route; +import io.vertx.ext.web.Router; +import io.vertx.ext.web.RoutingContext; + +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.NoTypeConversionAvailableException; +import org.apache.camel.TypeConversionException; +import org.apache.camel.TypeConverter; +import org.apache.camel.component.http.server.PlatformHttpConstants; +import org.apache.camel.component.http.server.spi.HttpEndpointSpec; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.component.http.server.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultMessage; +import org.apache.camel.support.ExchangeHelper; +import org.apache.camel.support.MessageHelper; +import org.apache.camel.support.ObjectHelper; +import org.jboss.logging.Logger; + +@ApplicationScoped +@Named(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME) +public class QuarkusPlatformHttpEngine implements PlatformHttpEngine { Review comment: If possible I would like to do wiring with build steps 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324163568 ## File path: extensions/platform-http/component/pom.xml ## @@ -0,0 +1,57 @@ + + +http://maven.apache.org/POM/4.0.0; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +4.0.0 + +org.apache.camel.quarkus +camel-quarkus-platform-http-parent +0.1.1-SNAPSHOT +../pom.xml + + +camel-quarkus-platform-http-component +Camel Quarkus :: Platform HTTP :: Component + + + + +org.apache.camel.quarkus +camel-quarkus-bom +${project.version} +pom +import + + + + + + +org.apache.camel +camel-support + + +org.apache.camel +spi-annotations + + Review comment: looks like it lacks camel plugins to generate components metadata such has catalog entry and other bits 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324162374 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpConsumer.java ## @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Set; + +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.ExchangePattern; +import org.apache.camel.Processor; +import org.apache.camel.component.http.server.spi.HttpEndpointSpec; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.component.http.server.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; + +public class PlatformHttpConsumer extends DefaultConsumer implements HttpEndpointSpec { Review comment: This class may not bee needed if the creation of the consumer is delegated to the engine bits. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324161524 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpComponent.java ## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.support.DefaultComponent; + +public class PlatformHttpComponent extends DefaultComponent { Review comment: The component needs to be discoverable through standard camel discovery so you need to add the `@Component` annotation. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324167970 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpComponent.java ## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.support.DefaultComponent; + +public class PlatformHttpComponent extends DefaultComponent { + +public PlatformHttpComponent() { +super(); +} + +public PlatformHttpComponent(CamelContext context) { +super(context); +} + +@Override +protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception { +final String[] remainingParts = remaining.split(":"); +if (remainingParts.length != 2) { +throw new IllegalArgumentException("Expected two segments delimited by ':'; found " + remaining); +} +final Set methods = Method.parseList(remainingParts[0]); +final String path = remainingParts[1]; +return new PlatformHttpEndpoint(uri, this, methods, path); Review comment: I would prefer the URI syntax to be similar to other components, like platform-http://relative_path[?options] Also follow the conventions other http components have to filter methods (see `httpMethodRestrict`) 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324163268 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/spi/Method.java ## @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server.spi; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Locale; +import java.util.Set; +import java.util.TreeSet; + +/** + * An HTTP method. + */ +public enum Method { Review comment: camel has a `camel-http-common` artefact, we could think about improving/reusing what we have there. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324161759 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpComponent.java ## @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Map; +import java.util.Set; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.support.DefaultComponent; + +public class PlatformHttpComponent extends DefaultComponent { + +public PlatformHttpComponent() { +super(); +} + +public PlatformHttpComponent(CamelContext context) { +super(context); +} + +@Override +protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception { +final String[] remainingParts = remaining.split(":"); +if (remainingParts.length != 2) { +throw new IllegalArgumentException("Expected two segments delimited by ':'; found " + remaining); +} +final Set methods = Method.parseList(remainingParts[0]); +final String path = remainingParts[1]; +return new PlatformHttpEndpoint(uri, this, methods, path); +} + Review comment: There should be a getter/setter to set the engine. Discovering it through the registry is one of the options but usually camel component have much more flexibility. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324162643 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpConsumer.java ## @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Set; + +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.ExchangePattern; +import org.apache.camel.Processor; +import org.apache.camel.component.http.server.spi.HttpEndpointSpec; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.component.http.server.spi.PlatformHttpEngine; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.support.DefaultConsumer; + +public class PlatformHttpConsumer extends DefaultConsumer implements HttpEndpointSpec { + +public PlatformHttpConsumer(Endpoint endpoint, Processor processor) { +super(endpoint, processor); +} + +@Override +protected void doStart() throws Exception { +super.doStart(); +final PlatformHttpEngine platformHttpEngine = getEndpoint().getCamelContext().getRegistry() + .lookupByNameAndType(PlatformHttpConstants.PLATFORM_HTTP_ENGINE_NAME, PlatformHttpEngine.class); +platformHttpEngine.deploy(this); Review comment: We should "undeploy" when stopping/halting the component 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324166313 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/PlatformHttpEndpoint.java ## @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server; + +import java.util.Set; + +import org.apache.camel.AsyncEndpoint; +import org.apache.camel.Component; +import org.apache.camel.Consumer; +import org.apache.camel.Processor; +import org.apache.camel.Producer; +import org.apache.camel.component.http.server.spi.Method; +import org.apache.camel.spi.HeaderFilterStrategy; +import org.apache.camel.spi.HeaderFilterStrategyAware; +import org.apache.camel.spi.UriParam; +import org.apache.camel.support.DefaultEndpoint; + +public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware { + +private final String path; +private final Set methods; + +@UriParam(label = "advanced") +private HeaderFilterStrategy headerFilterStrategy = new PlatformHttpHeaderFilterStrategy(); + +public PlatformHttpEndpoint(String uri, Component component, Set methods, String path) { +super(uri, component); +this.methods = methods; +this.path = path; +} + +@Override +public Producer createProducer() throws Exception { +throw new UnsupportedOperationException("Producer is not supported"); +} + +@Override +public Consumer createConsumer(Processor processor) throws Exception { +return new PlatformHttpConsumer(this, processor); +} + +@Override +public HeaderFilterStrategy getHeaderFilterStrategy() { +return headerFilterStrategy; +} + +@Override +public void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy) { +this.headerFilterStrategy = headerFilterStrategy; +} + +public String getPath() { +return path; +} + +public Set getMethods() { +return methods; +} Review comment: There should be a getter/setter to set the engine. Discovering it through the registry is one of the options but usually camel component have much more flexibility. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service
lburgazzoli commented on a change in pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#discussion_r324160639 ## File path: extensions/platform-http/component/src/main/java/org/apache/camel/component/http/server/spi/PlatformHttpEngine.java ## @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.http.server.spi; + +/** + * An abstraction of an HTTP Server engine on which HTTP endpoints can be deployed. + */ +public interface PlatformHttpEngine { + +/** + * Deploys the given {@link HttpEndpointSpec} on this {@link PlatformHttpEngine} + * + * @param spec the {@link HttpEndpointSpec} to deploy + */ +void deploy(HttpEndpointSpec spec); Review comment: This can be simplified to something like: Consumer createConsumer(PlatformHttpEndpoint, Processor) Remember than other than deploying you need also to take care of the "undeploy" i.e. when the component is stopped/suspended. As side effect this would made `HttpEndpointSpec` not needed. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-website] zregvart opened a new pull request #87: fix: update wrong mailing list information
zregvart opened a new pull request #87: fix: update wrong mailing list information URL: https://github.com/apache/camel-website/pull/87 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] asf-ci commented on issue #201: Fix #184 Leverage platform http service
asf-ci commented on issue #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201#issuecomment-531213725 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/camel-quarkus-pr/156/Build result: FAILURE[...truncated 668.35 KB...]at java.lang.reflect.Method.invoke (Method.java:498)at hudson.maven.Maven3Builder.call (Maven3Builder.java:139)at hudson.maven.Maven3Builder.call (Maven3Builder.java:70)at hudson.remoting.UserRequest.perform (UserRequest.java:212)at hudson.remoting.UserRequest.perform (UserRequest.java:54)at hudson.remoting.Request$2.run (Request.java:369)at hudson.remoting.InterceptingExecutorService$1.call (InterceptingExecutorService.java:72)at java.util.concurrent.FutureTask.run (FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)at java.lang.Thread.run (Thread.java:748)[ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :camel-quarkus-integration-test-platform-httpchannel stoppedAdding one-line test results to commit status...Setting status of 985256a0dbc593bb4b0a3c02bf98a24b7c583c7d to FAILURE with url https://builds.apache.org/job/camel-quarkus-pr/156/ and message: 'FAILURE 73 tests run, 2 skipped, 0 failed.'Using context: default 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] ppalaga opened a new pull request #201: Fix #184 Leverage platform http service
ppalaga opened a new pull request #201: Fix #184 Leverage platform http service URL: https://github.com/apache/camel-quarkus/pull/201 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: us...@infra.apache.org With regards, Apache Git Services
Re: Planning release of Camel 2.23.4
+1. Thanks Gregor Il ven 13 set 2019, 11:57 Gregor Zurowski ha scritto: > Hi Everyone: > > We released Camel 2.23.3 back in June. I believe it's time to release > 2.23.4, the last planned release for the camel-2.23.x branch. We > currently have 17 resolved issues for this release: > > https://issues.apache.org/jira/projects/CAMEL/versions/12345671 > > What do you think? > > Thanks, > Gregor >
Planning release of Camel 2.23.4
Hi Everyone: We released Camel 2.23.3 back in June. I believe it's time to release 2.23.4, the last planned release for the camel-2.23.x branch. We currently have 17 resolved issues for this release: https://issues.apache.org/jira/projects/CAMEL/versions/12345671 What do you think? Thanks, Gregor
[ANNOUNCEMENT] Apache Camel 2.24.2 Released
The Camel community announces the immediate availability of the Camel 2.24.2 patch release. This is a new patch release for the Camel 2.24.x branch and contains 20 fixes and improvements applied in the past weeks by the community. The artifacts are published and ready for you to download [1] either from the Apache mirrors or from the Central Maven repository. For more details please take a look at the release notes [2]. Many thanks to all who made this release possible. On behalf of the Camel PMC, Gregor Zurowski [1] https://camel.apache.org/download/ [2] https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12345672=12311211
[GitHub] [camel-quarkus] ppalaga commented on issue #184: Leverage platform http service
ppalaga commented on issue #184: Leverage platform http service URL: https://github.com/apache/camel-quarkus/issues/184#issuecomment-531165704 > How should the URI scheme be called? `http-server` maybe? Going with `platform-http` after a discussion with @lburgazzoli 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: us...@infra.apache.org With regards, Apache Git Services
[RESULT] [VOTE] Release Apache Camel 2.24.2
Thanks for your participation in this vote. The vote passes with the following results: +1 binding: 7 (Alex Dettinger, Andrea Cosentino, Claus Ibsen, Gregor Zurowski, Luca Burgazzoli, Onder Sezgin, Zoran Regvart) +1 non-binding: 2 (François Papon, Omar Al-Safi) I am going to publish the artifacts for Camel 2.24.2 shortly. Thanks, Gregor On Mon, Sep 9, 2019 at 9:22 AM Gregor Zurowski wrote: > > Hi Everyone: > > This is a vote to release Apache Camel 2.24.2, the second patch > release for the camel-2.24.x branch with 20 fixes and improvements. > > Release notes: > https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12345672=12311211 > > Staging repository: > https://repository.apache.org/content/repositories/orgapachecamel-1150/ > > Tarballs: > https://repository.apache.org/content/repositories/orgapachecamel-1150/org/apache/camel/apache-camel/2.24.2/ > > Tag: > https://gitbox.apache.org/repos/asf?p=camel.git;a=tag;h=refs/tags/camel-2.24.2 > > Please test this release candidate and cast your vote. > [ ] +1 Release the binary as Apache Camel 2.24.2 > [ ] -1 Veto the release (provide specific comments) > > The vote is open for at least 72 hours. > > Thanks, > Gregor
Re: [VOTE] Release Apache Camel 2.24.2
+1 (binding) Gregor On Mon, Sep 9, 2019 at 9:22 AM Gregor Zurowski wrote: > > Hi Everyone: > > This is a vote to release Apache Camel 2.24.2, the second patch > release for the camel-2.24.x branch with 20 fixes and improvements. > > Release notes: > https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12345672=12311211 > > Staging repository: > https://repository.apache.org/content/repositories/orgapachecamel-1150/ > > Tarballs: > https://repository.apache.org/content/repositories/orgapachecamel-1150/org/apache/camel/apache-camel/2.24.2/ > > Tag: > https://gitbox.apache.org/repos/asf?p=camel.git;a=tag;h=refs/tags/camel-2.24.2 > > Please test this release candidate and cast your vote. > [ ] +1 Release the binary as Apache Camel 2.24.2 > [ ] -1 Veto the release (provide specific comments) > > The vote is open for at least 72 hours. > > Thanks, > Gregor