Using properties files
Properties files (with the file extension
.properties) can be used to either specify values for substitution variables in YAML files (see also
Using YAML configuration files) or to configure EPL. 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 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.
Note:
If the same property is defined more than once, the first definition that is loaded by the correlator takes precedence over all definitions that are loaded later. Messages are then logged for all later definitions that are being ignored.
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
Properties files are by default parsed using the ISO-8859-1 encoding (Latin-1). To use characters from other character sets, you have two options. You can use a \uXXXX escape sequence, which uses the UCS-2 character codes. This allows you to encode any character from the Basic Multilingual Plane (BMP). However, we do not support UTF-16 surrogate pairs to access characters outside the BMP. Alternatively, you can provide a UTF-8 BOM as the first characters of the file. In this case, you can use any Unicode sequence in UTF-8 directly in the file without any escaping.
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.
Instead of using a properties file or in addition to using a properties file, you can also use the
-D option of the
correlator executable. See
Starting the correlator.
Properties defined either through properties files or on the command line are available to EPL via the Management interface. For more details, see
Using the Management interface and the
API Reference for EPL (ApamaDoc) .
Correlator-integrated messaging for JMS and the distributed MemoryStore have their own properties files, which are Spring files. Keep in mind that any properties that are specified with the
--config file or
-Dkey=value option of the
correlator executable take precedence and override the properties defined in a Spring properties file. See also
Configuration files for JMS and
Configuration files for distributed stores.