heyplusyou opened a new issue #1816:
URL: https://github.com/apache/camel-quarkus/issues/1816


   Hi all,
   
   I am currently setting up a camel project based on quarkus and I would like 
to handle the route activation based on DB entries at runtime. We created a 
couple of routes in DSL by extending the RouteBuilder and it works fine with 
route auto discovery.
   
   But to implement the DB and runtime activation I would need to disable the 
auto discovery. Is there a way to do this?
   
   I found the option
   
   - quarkus.camel.main.routes-discovery.enabled=false
   
   But I still finds the RouteBuilders and starts them during startup.
   
   Quarkus: 1.8.0
   Camel Quarkus: 1.1.0
   
   
   **application.properties**
   ```
   quarkus.camel.routes-discovery.enabled=false
   quarkus.camel.routes-discovery.exclude-patterns="de/*"
   
   management.endpoints.web.exposure.include=hawtio,jolokia
   
   quarkus.log.category."org.apache.camel.de.vce.esb.main".level=DEBUG
   # DATASOURCE
   db.host=${DB_HOST:localhost}
   db.port=${DB_PORT:5432}
   db.name=${DB_NAME:esb}
   quarkus.datasource.url=jdbc:postgresql://${db.host}:${db.port}/${db.name}
   quarkus.datasource.driver=org.postgresql.Driver
   quarkus.datasource.username=${DB_USERNAME:postgres}
   quarkus.datasource.password=${DB_PASSWORD:postgres}
   ```
   
   **log**
   ```
   2020-09-22 08:13:42,352 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] 
(Quarkus Main Thread) bootstrap runtime: 
org.apache.camel.quarkus.main.CamelMainRuntime
   2020-09-22 08:13:42,365 INFO  
[org.apa.cam.mai.DefaultConfigurationConfigurer] (Quarkus Main Thread) Using 
HealthCheckRegistry: 
org.apache.camel.impl.health.DefaultHealthCheckRegistry@5cee50ae
   2020-09-22 08:13:42,382 INFO  [org.apa.cam.qua.mai.CamelMainRoutesCollector] 
(Quarkus Main Thread) Loading additional Camel XML route templates from: 
classpath:camel-template/*.xml
   2020-09-22 08:13:42,389 INFO  [org.apa.cam.man.JmxManagementStrategy] 
(Quarkus Main Thread) JMX is enabled
   2020-09-22 08:13:42,445 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] 
(Quarkus Main Thread) Apache Camel 3.5.0 (camel-1) is starting
   2020-09-22 08:13:42,572 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] 
(Quarkus Main Thread) 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-09-22 08:13:42,572 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] 
(Quarkus Main Thread) Using HealthCheck: camel-microprofile-health
   2020-09-22 08:13:42,680 INFO  
[org.apa.cam.imp.eng.InternalRouteStartupManager] (Quarkus Main Thread) Route: 
testroute started and consuming from: file://XXXXXX
   2020-09-22 08:13:42,681 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] 
(Quarkus Main Thread) Total 1 routes, of which 1 are started
   2020-09-22 08:13:42,681 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] 
(Quarkus Main Thread) Apache Camel 3.5.0 (camel-1) started in 0.236 seconds
   ```
   
   Many 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


Reply via email to