I am new to Apache Camel, and have a problem statement in hand. I want to build a code where I can refer to the flags in the camel properties and allow a route to be enabled/disabled based on the flags availability in the properties file. How do I proceed with it?
Asked
Active
Viewed 1,009 times
1 Answers
2
You can use the .autoStartup("{{propertyName}}")
function from the Java DSL. For example:
from("activemq:queue:special").autoStartup("{{startupRouteProperty}}").to("file://backup");
http://camel.apache.org/configuring-route-startup-ordering-and-autostartup

CookieSoup
- 408
- 5
- 10

mgyongyosi
- 2,557
- 2
- 13
- 20
-
Actually, I want to achieve something like this from("some data source"). choice(). when(properties contain flag x)- do some action. otherwise()-skip the referred route and proceed. Can this be achieved. If yes, can you please guide me with the syntax? – Gitika Srivastava Apr 03 '17 at 10:03