This example shows how Camel is capable of loading routes during startup using the new route loader system. The route loader has support for loading routes in XML, Java and YAML (other languages to be added).
This is the feature that was first developed as part of Camel K which has evolved to be a core part of Camel.
The example has the following routes in the src/main/resources/myroutes directory:
-
MyRouteBuilder.javawhich is a java file, but the file is not part of the regular source code and is therefore not compiled with the regular Java compiler. The route is loaded by Camel’s route loader and dynamically compiled viacamel-java-joor-dslduring startup of Camel. -
my-yaml-route.yamlwhich is loaded by the newcamel-yaml-dslengine. -
cheese-route.xmlwhich is loaded by thecamel-xml-io-dslengine.
If you hit any problem using Camel or have some feedback, then please let us know.
We also love contributors, so get involved :-)
The Camel riders!