Apama Documentation : Deploying and Managing Apama Applications : Correlator Utilities Reference : Configuring the correlator : Including YAML configuration files inside another YAML configuration file
Including YAML configuration files inside another YAML configuration file
Instead of specifying a list of configuration files on the command line with the --config option, you can also specify these files in the includes section of another configuration file. For example:
includes:
- myCodec.yaml
- myTransport.yaml
When the configuration file that is specified with the --config option is processed, the list in the includes section is expanded recursively, and the information inside the included configuration files is merged into the main configuration. The same rules are used as for the --config option; for details, see the description of that option in Starting the correlator.
You do not need to worry about multiple file inclusions (such as cyclical or diamond references), but you must still be careful not to have duplicate keys in top-level maps.
Using an includes section can be useful for specifying a connectivity chain in a modular way. For example, you may have a main configuration file with the following contents:
startChains:
myChain:
- apama.eventMap
- MyCodec
- MyTransport
includes:
- myCodec.yaml
- myTransport.yaml
where the included files have the following contents:
*myCodec.yaml:
connectivityPlugins:
MyCodec:
classpath: ${myJarVersion}
class: com.example.my.Codec
includes:
- propDir
You can include further files in an included file. Instead of a file name, you can also specify the name of a directory in the includes section. All files that can be found in this directory are then included.
The includes section in the above example assumes that there is a directory named propDir which contains a jarVersions.properties file with the following content:
myJarVersion=myJar316.jar
*myTransport.yaml:
connectivityPlugins:
MyTransport:
classpath: myOther.jar
class: com.example.my.Transport
Properties defined in included files are only valid for later files. For example, the deployment with the following files will work:
*1.yaml:
includes:
- my.properties
- 2.yaml
*my.properties:
3=3.yaml
*2.yaml:
includes:
- ${3}
The deployment with the following file, however, will not work:
*1.yaml:
includes:
- my.properties
- 2.yaml
- ${3}
In this case, you should specify the my.properties file as an argument with the --config option, in addition to the 1.yaml file.
See Using properties files for more information.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback