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/02/05 16:56:34 UTC
[GitHub] [camel-quarkus] jstakun opened a new issue #683: Timer not fired in
native mode
jstakun opened a new issue #683: Timer not fired in native mode
URL: https://github.com/apache/camel-quarkus/issues/683
Hello
I've got route initated by timer. In java mode it works fine, but in native mode it doesn't seem to be initiated. Even simple test fails in native mode:
` <route id="timer-test-route">
<from id="timer-test" uri="timer://testTimer?period=10s"/>
<log id="_log41" message="this test timer is fired every 10 second"/>
</route>`
`$ ./wildwest-bot-1.0.0-SNAPSHOT-runner
2020-02-05 17:55:44,449 INFO [org.apa.cam.mai.BaseMainSupport] (main) Auto-configuration summary:
2020-02-05 17:55:44,449 INFO [org.apa.cam.mai.BaseMainSupport] (main) camel.main.xmlroutes=classpath:/spring/camel-routes.xml
2020-02-05 17:55:44,449 INFO [org.apa.cam.mai.BaseMainSupport] (main) camel.context.name=wildwest-bot
2020-02-05 17:55:44,449 INFO [org.apa.cam.qua.cor.CamelRoutesCollector] (main) Loading additional Camel XML routes from: classpath:/spring/camel-routes.xml
2020-02-05 17:55:44,449 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: wildwest-bot) is starting
2020-02-05 17:55:44,449 INFO [org.apa.cam.imp.eng.DefaultManagementStrategy] (main) JMX is disabled
2020-02-05 17:55:44,449 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
2020-02-05 17:55:44,450 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Total 0 routes, of which 0 are started
2020-02-05 17:55:44,450 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: wildwest-bot) started in 0.001 seconds
2020-02-05 17:55:44,450 INFO [io.quarkus] (main) wildwest-bot 1.0.0-SNAPSHOT (running on Quarkus 1.2.0.Final) started in 0.006s.
2020-02-05 17:55:44,450 INFO [io.quarkus] (main) Profile prod activated.
2020-02-05 17:55:44,450 INFO [io.quarkus] (main) Installed features: [camel-bean, camel-core, camel-direct, camel-jackson, camel-log, camel-netty, camel-netty-http, camel-support-common, camel-support-xml, camel-timer, camel-xml, cdi]`
I'm using quarkus 1.2.0.Final, camel-quarkus 1.0.0-M3 and GraalVM 19.3.1
Please advice.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-quarkus] jstakun closed issue #683: Timer not fired in
native mode
Posted by GitBox <gi...@apache.org>.
jstakun closed issue #683: Timer not fired in native mode
URL: https://github.com/apache/camel-quarkus/issues/683
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-quarkus] jstakun commented on issue #683: Timer not fired in
native mode
Posted by GitBox <gi...@apache.org>.
jstakun commented on issue #683: Timer not fired in native mode
URL: https://github.com/apache/camel-quarkus/issues/683#issuecomment-582507843
https://github.com/jstakun/wildwest-bot/blob/quarkus/wildwest-bot/pom.xml
Actually it seems from the log my route is not started at all
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-quarkus] oscerd commented on issue #683: Timer not fired in
native mode
Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #683: Timer not fired in native mode
URL: https://github.com/apache/camel-quarkus/issues/683#issuecomment-582506042
Can you show what you have in your POM?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli edited a comment on issue #683: Timer
not fired in native mode
Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #683: Timer not fired in native mode
URL: https://github.com/apache/camel-quarkus/issues/683#issuecomment-582802212
I did try the [example](https://github.com/apache/camel-quarkus/tree/master/examples/timer-log-xml) we provide and everything works in both native and jvm mode.
Native log:
```
$ ./target/camel-quarkus-examples-timer-log-xml-1.1.0-SNAPSHOT-runner
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Properties from Camel properties component:
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.root=/home/lburgazz/work/apache/dev/camel
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.context.name=quarkus-camel-example-timer-log-xml
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.version=3.0.1
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.quarkus.project.root=/home/lburgazz/work/apache/dev/camel-quarkus
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.main.xml-routes=file:src/main/resources/routes/my-routes.xml
2020-02-06 09:57:51,641 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Auto-configuring main from loaded properties: 1
2020-02-06 09:57:51,642 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Configured property: camel.main.xmlroutes=file:src/main/resources/routes/my-routes.xml on bean: org.apache.camel.main.MainConfigurationProperties@3cd01c0
2020-02-06 09:57:51,643 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Auto-configuring CamelContext from loaded properties: 1
2020-02-06 09:57:51,644 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Configured property: camel.context.name=quarkus-camel-example-timer-log-xml on bean: CamelContext(quarkus-camel-example-timer-log-xml)
2020-02-06 09:57:51,645 INFO [org.apa.cam.mai.BaseMainSupport] (main) Auto-configuration summary:
2020-02-06 09:57:51,645 INFO [org.apa.cam.mai.BaseMainSupport] (main) camel.main.xmlroutes=file:src/main/resources/routes/my-routes.xml
2020-02-06 09:57:51,645 INFO [org.apa.cam.mai.BaseMainSupport] (main) camel.context.name=quarkus-camel-example-timer-log-xml
2020-02-06 09:57:51,645 DEBUG [org.apa.cam.mai.RoutesConfigurer] (main) RoutesCollectorEnabled: org.apache.camel.quarkus.core.CamelRoutesCollector@314c468
2020-02-06 09:57:51,646 INFO [org.apa.cam.qua.cor.CamelRoutesCollector] (main) Loading additional Camel XML routes from: file:src/main/resources/routes/my-routes.xml
2020-02-06 09:57:51,648 DEBUG [org.apa.cam.mai.RoutesConfigurer] (main) Adding routes into CamelContext from XML files: file:src/main/resources/routes/my-routes.xml
2020-02-06 09:57:51,648 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) is starting
2020-02-06 09:57:51,648 INFO [org.apa.cam.imp.eng.DefaultManagementStrategy] (main) JMX is disabled
2020-02-06 09:57:51,650 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
2020-02-06 09:57:51,650 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Route: xml-route started and consuming from: timer://from-xml?period=1s
2020-02-06 09:57:51,650 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Total 1 routes, of which 1 are started
2020-02-06 09:57:51,650 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) started in 0.002 seconds
2020-02-06 09:57:51,650 INFO [io.quarkus] (main) camel-quarkus-examples-timer-log-xml 1.1.0-SNAPSHOT (running on Quarkus 1.2.0.Final) started in 0.021s.
2020-02-06 09:57:51,650 INFO [io.quarkus] (main) Profile prod activated.
2020-02-06 09:57:51,650 INFO [io.quarkus] (main) Installed features: [camel-core, camel-log, camel-support-common, camel-support-xml, camel-timer, camel-xml, cdi]
2020-02-06 09:57:52,650 INFO [xml-route] (Camel (camel-1) thread #1 - timer://from-xml) Hello XML!
2020-02-06 09:57:53,650 INFO [xml-route] (Camel (camel-1) thread #1 - timer://from-xml) Hello XML!
2020-02-06 09:57:54,650 INFO [xml-route] (Camel (camel-1) thread #1 - timer://from-xml) Hello XML!
2020-02-06 09:57:54,668 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) is shutting down
2020-02-06 09:57:54,668 INFO [org.apa.cam.mai.MainLifecycleStrategy] (main) CamelContext: quarkus-camel-example-timer-log-xml has been shutdown, triggering shutdown of the JVM.
2020-02-06 09:57:54,669 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) uptime 3.020 seconds
2020-02-06 09:57:54,669 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) is shutdown in 0.001 seconds
2020-02-06 09:57:54,669 INFO [io.quarkus] (main) camel-quarkus-examples-timer-log-xml stopped in 0.001s
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-quarkus] jstakun commented on issue #683: Timer not fired in
native mode
Posted by GitBox <gi...@apache.org>.
jstakun commented on issue #683: Timer not fired in native mode
URL: https://github.com/apache/camel-quarkus/issues/683#issuecomment-582811954
Thanks! This was missing part for me. After adding resources-config.json it works like a charm in both java and native mode.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-quarkus] jstakun commented on issue #683: Timer not fired in
native mode
Posted by GitBox <gi...@apache.org>.
jstakun commented on issue #683: Timer not fired in native mode
URL: https://github.com/apache/camel-quarkus/issues/683#issuecomment-582790927
What should be correct value for camel.main.xml-routes
In examples you are using:
`camel.main.xml-routes = file:src/main/resources/routes/my-routes.xml`
But this doesn't work for me in both java and native mode.
I've tried:
`camel.main.xml-routes = classpath:/spring/camel-routes.xml`
and this works for me only in java mode
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #683: Timer not
fired in native mode
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #683: Timer not fired in native mode
URL: https://github.com/apache/camel-quarkus/issues/683#issuecomment-582802212
I did try the [example](https://github.com/apache/camel-quarkus/tree/master/examples/timer-log-xml) we provide and everything works in both native and jvm mode:
```
$ ./target/camel-quarkus-examples-timer-log-xml-1.1.0-SNAPSHOT-runner
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Properties from Camel properties component:
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.root=/home/lburgazz/work/apache/dev/camel
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.context.name=quarkus-camel-example-timer-log-xml
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.version=3.0.1
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.quarkus.project.root=/home/lburgazz/work/apache/dev/camel-quarkus
2020-02-06 09:57:51,639 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) camel.main.xml-routes=file:src/main/resources/routes/my-routes.xml
2020-02-06 09:57:51,641 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Auto-configuring main from loaded properties: 1
2020-02-06 09:57:51,642 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Configured property: camel.main.xmlroutes=file:src/main/resources/routes/my-routes.xml on bean: org.apache.camel.main.MainConfigurationProperties@3cd01c0
2020-02-06 09:57:51,643 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Auto-configuring CamelContext from loaded properties: 1
2020-02-06 09:57:51,644 DEBUG [org.apa.cam.mai.BaseMainSupport] (main) Configured property: camel.context.name=quarkus-camel-example-timer-log-xml on bean: CamelContext(quarkus-camel-example-timer-log-xml)
2020-02-06 09:57:51,645 INFO [org.apa.cam.mai.BaseMainSupport] (main) Auto-configuration summary:
2020-02-06 09:57:51,645 INFO [org.apa.cam.mai.BaseMainSupport] (main) camel.main.xmlroutes=file:src/main/resources/routes/my-routes.xml
2020-02-06 09:57:51,645 INFO [org.apa.cam.mai.BaseMainSupport] (main) camel.context.name=quarkus-camel-example-timer-log-xml
2020-02-06 09:57:51,645 DEBUG [org.apa.cam.mai.RoutesConfigurer] (main) RoutesCollectorEnabled: org.apache.camel.quarkus.core.CamelRoutesCollector@314c468
2020-02-06 09:57:51,646 INFO [org.apa.cam.qua.cor.CamelRoutesCollector] (main) Loading additional Camel XML routes from: file:src/main/resources/routes/my-routes.xml
2020-02-06 09:57:51,648 DEBUG [org.apa.cam.mai.RoutesConfigurer] (main) Adding routes into CamelContext from XML files: file:src/main/resources/routes/my-routes.xml
2020-02-06 09:57:51,648 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) is starting
2020-02-06 09:57:51,648 INFO [org.apa.cam.imp.eng.DefaultManagementStrategy] (main) JMX is disabled
2020-02-06 09:57:51,650 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
2020-02-06 09:57:51,650 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Route: xml-route started and consuming from: timer://from-xml?period=1s
2020-02-06 09:57:51,650 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Total 1 routes, of which 1 are started
2020-02-06 09:57:51,650 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) started in 0.002 seconds
2020-02-06 09:57:51,650 INFO [io.quarkus] (main) camel-quarkus-examples-timer-log-xml 1.1.0-SNAPSHOT (running on Quarkus 1.2.0.Final) started in 0.021s.
2020-02-06 09:57:51,650 INFO [io.quarkus] (main) Profile prod activated.
2020-02-06 09:57:51,650 INFO [io.quarkus] (main) Installed features: [camel-core, camel-log, camel-support-common, camel-support-xml, camel-timer, camel-xml, cdi]
2020-02-06 09:57:52,650 INFO [xml-route] (Camel (camel-1) thread #1 - timer://from-xml) Hello XML!
2020-02-06 09:57:53,650 INFO [xml-route] (Camel (camel-1) thread #1 - timer://from-xml) Hello XML!
2020-02-06 09:57:54,650 INFO [xml-route] (Camel (camel-1) thread #1 - timer://from-xml) Hello XML!
2020-02-06 09:57:54,668 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) is shutting down
2020-02-06 09:57:54,668 INFO [org.apa.cam.mai.MainLifecycleStrategy] (main) CamelContext: quarkus-camel-example-timer-log-xml has been shutdown, triggering shutdown of the JVM.
2020-02-06 09:57:54,669 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) uptime 3.020 seconds
2020-02-06 09:57:54,669 INFO [org.apa.cam.qua.cor.FastCamelContext] (main) Apache Camel 3.0.1 (CamelContext: quarkus-camel-example-timer-log-xml) is shutdown in 0.001 seconds
2020-02-06 09:57:54,669 INFO [io.quarkus] (main) camel-quarkus-examples-timer-log-xml stopped in 0.001s
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #683: Timer not
fired in native mode
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #683: Timer not fired in native mode
URL: https://github.com/apache/camel-quarkus/issues/683#issuecomment-582797563
`camel.main.xml-routes` is a runtime property so
- if you use `file` scheme, the file files should be readable by the application when the application runs, maybe you need to check from where the application is started and see if you can read that file.
- if you use the `classpath`, then you need to embed the file in the native image, otherwise if won't be available from the classpath, see [this](https://quarkus.io/guides/writing-native-applications-tips#including-resources) guide for more info
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services