Capital Markets Adapters 10.3.1 | Apama Capital Markets Adapters Documentation 10.3.1 | Apama Base FIX Adapter | IAF FIX adapter | FIX order management transport | Filter Codec
 
Filter Codec
The filter codec provides a flexible way of removing fields from events upon certain conditions. This is useful in FIX where there are certain rules pertaining to event structure in some situations. For example, when sending a market order to a trading system it may be a requirement that no price field is set. With the filter codec is possible to say remove the price field if it is zero.
Each property to the filter codec that begins with filter. defines a new filter and takes the form:
<property name="filter.<direction>.<field>" value="<value>"/>
If no <field> is specified then the filter will be applied globally to all fields and likewise for <direction>. The <value> is the field value that must be used to invoke the filter.
For example, the following configuration removes any field with an empty value in both directions and removes field 44 if its value is “0” in the upstream direction.
<codec name="FilterCodec" library="FilterCodec">
<property name="removeTransportField" value="false"/>
<property name="TransportFieldName" value="transportName"/>
<property name="filter" value=""/>
  <property name="filter.upstream.44" value="0"/>
</codec>
For convenience, FIX adapter ships FIX-static-codecs.xml which defines the standard codec configuration.