Capital Markets Adapters 10.11 | Apama Capital Markets Adapters Documentation 10.11 | CME Simple Binary Encoding Adapter | Configuring IAF
 
Configuring IAF
An IAF process can support multiple instances of the CME_SBE transport, which can in turn provide data from multiple CME market data channels.
To configure the transport, make a copy of the CME_SBE.xml.dist template configuration file (for example, copy to "CME_SBE _PROD.xml") and edit the copy as described below. All user-configurable parameters are marked with @PARAMETER_NAME@ text in the template configuration. No other part of the transport configuration file should need to be changed.
Transport name and correlator configuration
Replace @CME_SBE_TRANSPORT@ in the <transport> element with the name of this transport instance, for example, "CME_PROD". The same name should also be substituted into the "channels" attribute of the <source> element at the end of the configuration file. Replace @CORRELATOR_HOST@ and @CORRELATOR_PORT@ with the hostname and listening port of your correlator instance.
Message template file configuration
The FIX/SBE decoder uses a template file supplied by CME to describe all of the message structures on the FIX/SBE feed. The most recent template file for each environment (production, certification or new-release certification) can be downloaded from ftp.cmegroup.com. Replace @CME_SBE_TEMPLATES_FILE@ in the transport properties with the full path to the template file.
Channel definitions file configuration
The transport uses a configuration file supplied by the CME to define all of the hosts, ports and multicast groups used by the available market data channels. The most recent channel configuration file for the feed (production, certification or new-release certification) can be downloaded from ftp.cmegroup.com. Replace @CME_SBE_CHANNEL_FILE@ in the transport properties with the full path to this file.
IAF channel name
Replace @CME_SBE_CHANNEL@ with the channel name on which the IAF process will be running. The IAF will listen to the correlator from this channel.
Channels to configure
The List of channels that the transport will connect and configure should be specified. Replace the @CONFIGURE_CHANNELS@ parameter with a comma separated list of channels. For example to configure channels 9 and channel 11, Replace @CONFIGURE_CHANNELS@ with "11, 9".
RefreshNow
The RefreshNow parameter is to tell the adapter whether to request an immediate refresh of security definitions on the configured channels. The default value is set to true.
Additional transport configuration
*CorrelatorHBTimeout. A natural number telling the transport how many seconds it should wait for a heartbeat from the service monitors before deciding that the connection had been lost. If not specified in the configuration file it defaults to 15 seconds.
*MulticastInterface. IP address (as a dotted quad, for example, "1.2.3.4") of the network interface on the machine running the adapter that should be used to subscribe to UDP multicast traffic. If not specified, all interfaces will be used. For example:

<property name="MulticastInterface" value="a.b.c.d"/>
You can also configure MulticastInterface for different feeds (primary and secondary). For Example:

<property name="MulticastInterface.A" value="a.b.c.d"/>
<property name="MulticastInterface.B" value="w.x.y.z"/>
*IncludeExtraParam. Using this property, adapter can publish requested fields/tag for any market data as extra parameters. These tags must be separated by comma. For example:
<property name="IncludeExtraParam" value="60,75"/>
Note:
Only top level fields can be published using this property.
*SecurityDefinitionCacheFolder. Location Of Security Definition Cache Folder ( as a String). The cache file is created inside this folder by the following name Channel_<channel name>.dat.
For example, the security definition cache file for channel no 11 should be named as Channel_11.dat.
*DisableSecurityDefinitionCache. Parameter to tell the adapter whether to load/save the security definition from/to the security definition cache file. If set to false, the transport will try to load the security definition from the SecurityDefinitionCacheFolder. The name of the cache file should be Channel_<channel name>.dat. If the file is not present cache will not be loaded. If RefreshNow configuration parameter was set to true and if the DisableSecurityDefinitionCache is set to false, adapter will save the security definition in the cache file in SecurityDefinitionCacheFolder. For every configured channel one cache file will be created. By default it is set to false.
*LogMessages. A comma-separated list of FIX message types that should be logged when they are received or sent by the adapter. The message contents will be logged at INFO level. The following message types are supported:
*Heartbeat
*Logout
*Logon
*News
*SecurityDefenition
*SecurityStatus
*QuoteRequest
*MarketDataRequest
*MarketDataFullRefresh
*MarketDataIncrementalRefresh
*MarketDataRequestReject
*Unknown
*LogFIXMessages. A Boolean property to tell the transport whether to save the Fix Messages it receives in a file. By default the file will be saved in the folder named "CME_FIX_LOG". The filename will be "Channel_"<channel name>_<feed type>.log. For example, all the snapshots received from channel 11 will be saved in the file Channel_11_S.log.
*FIXLogFolder. Location of the Fix Log Folder (as a String). If specified the transport will save the fix messages inside this folder.
*LogDebug. A comma separated list of extra debug logging categories that should be enabled. The additional logging produced by an enabled category will be logged at the INFO level unless otherwise stated. Currently the following categories are supported:
*UpstreamEvents enable logging of all events sent to the adapter by the correlator ("upstream" events). These will include subscription and unsubscription requests, commands to enable and disable the feed of security definitions, and heartbeat events.
*DropCrossedBooks. A Boolean property to tell the adapter whether to prevents all Depth events having best bid price >= best offer price from being published. By default it's false.
*PublishDepthSourceKeys. A Boolean property, if set to "true", the com.apama.marketdata.Depth events generated by the adapter will contain extraParams keys identifying the "source" (that is, the outright or implied book) of each price level. The default value is false. For each Bid Level I, the extraParam Bid-i can take several different values:
*" A" is the price at this bid level includes actual orders
*"I" is the price at this bid level includes implied orders
*"AI" is the price at this bid level includes actual and implied orders
*"Ask1"-"AskN" are the As for the corresponding "BidN" keys
*PublishUpdateInfoKeys. A Boolean property, if set to "true", com.apama.markertdata.Depth events will include extraParams keys identifying the "source" of each update which are the channel, update type, and message sequence numbers Channel - FIX/SBE channel number.
*UpdateType - "S" (Snapshot) or "I" (Incremental)
*SeqNum - Per-channel message sequence number
*RptSeq - Highest per-instrument update sequence number that contributed to this event
*RptSeq0 - Lowest per-instrument update sequence number that contributed to this event
*LastMsgSeq - (Snapshots only) highest incremental message sequence number that contributed to the contents of the snapshot message
Its default Value is false.
*PublishExtraFIXKeys. A Boolean property, If set to "true", com.apama.marketdata.Depth events will include additional FIX tags from the FIX/SBE messages used to generate the events, in the extraParams dictionary. The set of extra tags that will be included is subject to change. The default value of this key is "false".
*PublishTradeSummary. A Boolean property to tell the adapter to send trade summary details for corresponding Trade update's. By default it's set to false.
*PublisherPoolSize. This property is used to configure the size of the publisher thread pool. The default size is 2.
*DecoderPoolSize. This property is used to configure the size of the decoder thread pool. The default size is 1.
Note that LogMessages, LogFixMessages and LogDebug can produce extreme amounts of output and should be used with caution in a production environment.
Clients wishing to minimize the size of Depth events by eliminating extraParams that are not required for a given application should keep the PublishDepthSourceKeys, PublishUpdateInfoKeys, and PublishExtraFIXKeys session parameters to "false" as required.
Note:
If RefreshNow is set to false, and DisableSecurityDefinitionCache is set to true (that is, secdef cache loading from the disk is disabled), adapter will automatically set RefreshNow to true.
After setting the parameters, your application.dist file must look similar to the sample below:
<property name="ChannelConfigFile" value=" config.xml" />
<property name="TemplatesFile" value=" templates.xml" />
<property name="LogDebug" value=""/>
<property name="LogMessages" value=""/>
<property name="LogFIXMessages" value="true"/>

<property name="ConfigureChannels" value="4, 9, 11 "/>
<property name="RefreshNow" value="true"/>

<!-- Channel on which the IAF is running -->
<property name="IAF_CHANNEL" value="CME_CHANNEL"/>

<!-- Correlator Heartbeat Timeout -->
<property name="CorrelatorHBTimeout" value="30"/>

<property name="DropCrossedBooks” value=”true”/>

<property name="MulticastInterface" value="0.0.0.0 "/>
The Security definition Cache file
As mentioned above the name of the security definition cache file should be Channel_channel name.dat. The data in the cache file is in the following format:
*Each line corresponds to one security definition update
*Each line has the structure: <template-id > <fixMessage>
For example the security definition cache file for channel 11 may look like:
140 <SecurityDefinition Message>
140 <SecurtiyDefinition Message>
151 <SecuityDefintion Message>