Sunday, January 5, 2014

Camel Route autoStartup via Property Placeholder

It might not be obvious in the Camel autoStartup documentation, but this configuration can be managed via a property placeholder. Such that the route definition would look like the following:

<route autoStartup="{{route.feed.autostart}}">

Why would you need to do this? In my use, the property placeholder variables are mostly environment specific, allowing deployment of different ".cfg" files per environment (such as development verses production). Given a situation where your development environment consist of more than one environment, such as a QA environment, but the integration destination of the route data only has one, then you wouldn't want to execute the route in both the development and QA environments, but only one. Then, in your property placeholder ".cfg" files, you can map the autoStartup flag to be environment specific.

No comments:

Share on Twitter