Using properties files
Properties files (with the file extension
.properties) can be used to specify values for substitution variables in YAML files (see also
Using YAML configuration files). A properties file must be either in ISO-8859-1 encoding or in UTF-8 encoding if it begins with an UTF-8 byte order mark (BOM).
You can specify one or more properties files using the
--config option when you start the correlator. See
Starting the event correlator. The properties files are processed in the order in which they appear on the command line. Each properties file can refer to properties that have already been defined by a previously processed properties file, using
${varname} syntax.
The properties file format is the same as the standard Java .properties file format, with # for comments and \\ used to escape any occurrences of \. For example:
# my comment line
myplugin.mykey=c:\\my directory
You can use the following predefined properties:
Property | Description |
${PARENT_DIR} | The absolute normalized path of the directory containing the properties file or YAML file currently being processed. |
${APAMA_HOME} | The path to the Apama installation. |
${APAMA_WORK} | The path to the Apama work directory. |
${$} | The literal $ sign. |
All properties are applied to all YAML files, although conventionally, there is often a .properties file named the same as each .yaml file. Properties files, however, are not actually tied in to YAML files in any way. It is therefore recommended that you prefix each property key with a unique string, such as the identifier of the chain to which it applies.
Note: | Instead of using a properties file or in addition to using a properties file, you can also use the -D option of the correlator tool. See Starting the event correlator. |