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 2020/12/23 12:51:17 UTC

[GitHub] [camel-k] edeandrea opened a new issue #1870: camel.component.* properties not being respected under Quarkus runtime

edeandrea opened a new issue #1870:
URL: https://github.com/apache/camel-k/issues/1870


   I have a camel-k integration that was using the `camel-kafka` and `camel-infinispan` components. I had also been setting the trait  `quarkus.enabled=false`.
   
   When I change the `quarkus.enabled` trait to `true`, the `camel.component.kafka.*` and `camel.component.infinispan.*` properties no longer work.
   
   Here's the "before" example that was working: https://github.com/edeandrea/debezium-demo-apb/blob/43c689c81ba51ca5c714a65a3436766003b5f4ec/roles/Demo/objects/camelk-client.yml
   
   Here's the example which isn't working: https://github.com/edeandrea/debezium-demo-apb/blob/master/roles/Demo/objects/camelk-client.yml
   
   In addition, the `hotrod-client.properties` file does not seem to be getting picked up when running under quarkus. The hotrod configuration is not getting applied when entries are being pushed into Infinispan.


----------------------------------------------------------------
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-k] edeandrea closed issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea closed issue #1870:
URL: https://github.com/apache/camel-k/issues/1870


   


----------------------------------------------------------------
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-k] edeandrea commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758092905


   Thank you @lburgazzoli for looking into it. I will try out your suggestion and report back.


----------------------------------------------------------------
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-k] davsclaus edited a comment on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
davsclaus edited a comment on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758526376


   > @davsclaus wonder if we should have an option to disable auto-wiring on a per component basis
   
   Yeah we can do that.
   https://issues.apache.org/jira/browse/CAMEL-16021


----------------------------------------------------------------
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-k] lburgazzoli commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758443257


   on 1.2 the property should be `camel.main.autowire-component-properties = false`


----------------------------------------------------------------
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-k] edeandrea commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758228332


   Yes
   
   ```
   2021-01-11 20:13:32,099 INFO  [io.quarkus] (main) camel-k-integration 1.2.0 on JVM (powered by Quarkus 1.7.5.Final-redhat-00007) started in 15.696s.
   ```


----------------------------------------------------------------
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-k] davsclaus commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758526376


   > @davsclaus wonder if we should have an option to disable auto-wiring on a per component basis
   
   Yeah we can do that.
   


----------------------------------------------------------------
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-k] lburgazzoli commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758125174


   mind opening a new issue for that ? will have a look tomorrow


----------------------------------------------------------------
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-k] edeandrea edited a comment on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea edited a comment on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758105245


   @lburgazzoli another question here though - is there a particular reason that the `hotrod-client.properties` file is not picked up by camel-k?
   
   In my sample (https://gist.github.com/edeandrea/770c84be9da204ff0b13f2340975904e) I would assume that the properties I have defined in the [`hotrod-client.properties`](https://gist.github.com/edeandrea/770c84be9da204ff0b13f2340975904e#file-camelk-client-yml-L34-L45) and are [mounted into the `Integration`](https://gist.github.com/edeandrea/770c84be9da204ff0b13f2340975904e#file-camelk-client-yml-L56-L57) would be picked up by the `camel:infinispan` component, but they are not.
   
   I know this because my `hotrod-client.properties` file defines `infinispan.client.hotrod.marshaller=org.infinispan.commons.marshall.UTF8StringMarshaller`. When I run my integration and look into the Infinispan cache, the keys/values that are there aren't simple strings.


----------------------------------------------------------------
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-k] edeandrea commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758194897


   FYI setting `camel.main.autowired-enabled=false` does not work. Furthermore the integration does not start:
   
   ```
   exec java -cp ./resources:/etc/camel/conf:/etc/camel/conf.d/_configmaps/camelk-rhdg-client-config:/etc/camel/conf.d/_secrets/albums-rhdg-cert:/etc/camel/resources:/etc/camel/sources/i-source-000:dependencies/camel-k-integration-1.2.0-runner.jar:dependencies/com.fasterxml.jackson.core.jackson-annotations-2.11.2.redhat-00002.jar:dependencies/com.fasterxml.jackson.core.jackson-core-2.11.2.redhat-00002.jar:dependencies/com.fasterxml.jackson.core.jackson-databind-2.11.2.redhat-00002.jar:dependencies/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.11.2.redhat-00002.jar:dependencies/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.11.2.redhat-00002.jar:dependencies/com.fasterxml.jackson.module.jackson-module-jaxb-annotations-2.11.2.redhat-00002.jar:dependencies/com.fasterxml.jackson.module.jackson-module-parameter-names-2.11.2.redhat-00002.jar:dependencies/com.github.ben-manes.caffeine.caffeine-2.8.5.redhat-00003.jar:dependencies/com.github.luben.zstd-jni-1.4.3.1-redhat-00
 002.jar:dependencies/com.g...
   2021-01-11 20:09:04,915 INFO  [org.apa.cam.sup.LRUCacheFactory] (main) Detected and using LRUCacheFactory: camel-caffeine-lrucache
   2021-01-11 20:09:05,603 INFO  [org.apa.cam.k.Runtime] (main) Apache Camel K Runtime 1.5.0.fuse-jdk11-800010-redhat-00001
   2021-01-11 20:09:05,605 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime
   2021-01-11 20:09:05,814 INFO  [org.apa.cam.k.lis.SourcesConfigurer] (main) Loading routes from: SourceDefinition{name='RHDGUpdate', language='java', location='file:/etc/camel/sources/i-source-000/RHDGUpdate.java', }
   2021-01-11 20:09:10,013 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] (main) Failed to start application: org.apache.camel.PropertyBindingException: Error binding property (camel.main.autowiredEnabled=false) with name: autowiredEnabled on bean: org.apache.camel.main.MainConfigurationProperties@5ef6fd7f with value: false
   	at org.apache.camel.main.BaseMainSupport.setPropertiesOnTarget(BaseMainSupport.java:238)
   	at org.apache.camel.main.BaseMainSupport.autoConfigurationMainConfiguration(BaseMainSupport.java:1298)
   	at org.apache.camel.main.BaseMainSupport.autoconfigure(BaseMainSupport.java:564)
   	at org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:654)
   	at org.apache.camel.quarkus.main.CamelMain.initCamelContext(CamelMain.java:97)
   	at org.apache.camel.quarkus.main.CamelMain.doInit(CamelMain.java:67)
   	at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
   	at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:118)
   	at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
   	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
   	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101)
   	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40)
   	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:608)
   	at io.quarkus.runtime.Application.start(Application.java:90)
   	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:91)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:61)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:106)
   	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
   
   2021-01-11 20:09:10,014 ERROR [io.qua.application] (main) Failed to start application (with profile prod): java.lang.RuntimeException: java.lang.RuntimeException: org.apache.camel.PropertyBindingException: Error binding property (camel.main.autowiredEnabled=false) with name: autowiredEnabled on bean: org.apache.camel.main.MainConfigurationProperties@5ef6fd7f with value: false
   	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:47)
   	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101)
   	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40)
   	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:608)
   	at io.quarkus.runtime.Application.start(Application.java:90)
   	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:91)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:61)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:106)
   	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
   Caused by: java.lang.RuntimeException: org.apache.camel.PropertyBindingException: Error binding property (camel.main.autowiredEnabled=false) with name: autowiredEnabled on bean: org.apache.camel.main.MainConfigurationProperties@5ef6fd7f with value: false
   	at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:65)
   	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
   	... 9 more
   Caused by: org.apache.camel.PropertyBindingException: Error binding property (camel.main.autowiredEnabled=false) with name: autowiredEnabled on bean: org.apache.camel.main.MainConfigurationProperties@5ef6fd7f with value: false
   	at org.apache.camel.main.BaseMainSupport.setPropertiesOnTarget(BaseMainSupport.java:238)
   	at org.apache.camel.main.BaseMainSupport.autoConfigurationMainConfiguration(BaseMainSupport.java:1298)
   	at org.apache.camel.main.BaseMainSupport.autoconfigure(BaseMainSupport.java:564)
   	at org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:654)
   	at org.apache.camel.quarkus.main.CamelMain.initCamelContext(CamelMain.java:97)
   	at org.apache.camel.quarkus.main.CamelMain.doInit(CamelMain.java:67)
   	at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
   	at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:118)
   	at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
   	... 10 more
   ```


----------------------------------------------------------------
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-k] edeandrea commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758139544


   Added #1898 


----------------------------------------------------------------
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-k] edeandrea commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758859057


   I can confirm that setting `camel.main.autowire-component-properties=false` in my configuration does indeed allow my integration to respect the `camel.component.*` properties. What it does do, however, is now ignore the quarkus-specific properties (i.e. `quarkus.infinispan-client.*`).


----------------------------------------------------------------
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-k] lburgazzoli commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758091720


   The issue is related to the auto wired capabilities of camel-main that by default, auto configure components so in this case if there is an instance of a cache manager or a kafka client, then such instance is bound to the related components and other options then may not have effect (depending on the component). When running on quarkus, the advantage is that the client/manager/etc may be optimized for quarkus and some of the set-up can be done at build time which may determine a faster startup and improved footprint.
   
   As a workaround, you can disable automatic binding with the following property:
   
       camel.main.autowired-enabled = false
   
   At this point camel-main does not attempt any more to auto wire beans, thus the properties are then taken into account.
   
   @davsclaus wonder if we should have an option to disable auto-wiring on a per component basis


----------------------------------------------------------------
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-k] lburgazzoli edited a comment on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758091720


   The issue is related to the auto wired capabilities of camel-main that by default, auto configures components so in this case if there is an instance of a cache manager or a kafka client, then such instance is bound to the related components and other options may not have effect (depending on how the component is implemented but usually pre-configured instances have higher priority). 
   
   When running on quarkus, the advantage of auto wiring is that the client/manager/etc may be optimized for quarkus and some of the set-up can be done at build time which may determine a faster startup and improved footprint.
   
   As a workaround, you can disable automatic binding with the following property:
   
       camel.main.autowired-enabled = false
   
   At this point camel-main does not attempt any more to auto wire beans, thus the properties are then taken into account.
   
   @davsclaus wonder if we should have an option to disable auto-wiring on a per component basis


----------------------------------------------------------------
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-k] edeandrea commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758105245


   @lburgazzoli another question here though - is there a particular reason that the `hotrod-client.properties` file is not picked up by camel-k?
   
   In my sample (https://gist.github.com/edeandrea/770c84be9da204ff0b13f2340975904e) I would assume that the properties I have defined in the [`hotrod-client.properties`](https://gist.github.com/edeandrea/770c84be9da204ff0b13f2340975904e#file-camelk-client-yml-L34-L45) and are [mounted into the `Integration`](https://gist.github.com/edeandrea/770c84be9da204ff0b13f2340975904e#file-camelk-client-yml-L56-L57) would be picked up by the `camel:infinispan` component, but they are not.
   
   


----------------------------------------------------------------
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-k] edeandrea commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758125961


   Will do


----------------------------------------------------------------
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-k] lburgazzoli commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758861133


   That is expected as the `quarkus.infinispan-client.` namespace is owned by quarkus-infinispan


----------------------------------------------------------------
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-k] edeandrea edited a comment on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
edeandrea edited a comment on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758105245


   @lburgazzoli another question here though - is there a particular reason that the `hotrod-client.properties` file is not picked up by camel-k?
   
   In my sample (https://gist.github.com/edeandrea/770c84be9da204ff0b13f2340975904e) I would assume that the properties I have defined in the [`hotrod-client.properties`](https://gist.github.com/edeandrea/770c84be9da204ff0b13f2340975904e#file-camelk-client-yml-L34-L45) and are [mounted into the `Integration`](https://gist.github.com/edeandrea/770c84be9da204ff0b13f2340975904e#file-camelk-client-yml-L56-L57) would be picked up by the `camel:infinispan` component, but they are not.
   
   I know this because my `hotrod-client.properties` file defines `infinispan.client.hotrod.marshaller=org.infinispan.commons.marshall.UTF8StringMarshaller`. When I run my integration and look into the Infinispan cache, the keys/values that are there aren't simple strings - they're serialized using class serialization.


----------------------------------------------------------------
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-k] lburgazzoli commented on issue #1870: camel.component.* properties not being respected under Quarkus runtime

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1870:
URL: https://github.com/apache/camel-k/issues/1870#issuecomment-758227300


   ah ok, you are on camel-k 1.2 right ? that option is for 1.3. Will check the right tomorrow


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