The Filter Codec plug-in
The Apama filter codec plug-ins filter normalized event fields. You can use the filter codec to:
Route upstream events to particular transports
Remove particular fields from upstream and/or downstream events
To use the filter codec, the FilterCodec or JFilterCodec library must be available to the IAF at runtime. These are the filenames of the C++ and Java libraries that implements the plug-in.
In order to load this plug-in, the <codec> element in the adapter’s configuration file needs to load either the FilterCodec or JFilterCodec library. Note that for the Java version, the full path to the plug-in’s .jar file needs to be specified.
A configuration file for C/C++ uses this:
<codec name="FilterCodec" library="FilterCodec">
In a configuration file for Java:
<codec name="JFilterCodec"
jarName="Apama_install_dir\lib\JFilterCodec.jar"
className="com.apama.iaf.codec.filtercodec.JFilterCodec">
To configure the filter codec, add the following to the <codecs> section of the IAF configuration file:
<codec name="FilterCodec" library="FilterCodec">
<property name="transportFieldName" value="transport_field_name"/>
<property name="filter_spec_1" value="filter_condition_1"/>
<property name="filter_spec_2" value="filter_condition_2"/>
...
<property name="filter_spec_n" value="filter_condition_n"/>
</codec>
Details for replacing the variables in the above codec section are in the following topics: