Capital Markets Adapters 10.11 | Apama Capital Markets Adapters Documentation 10.11 | CME iLink FIX Adapter | Audit logger configuration | Support Custom/Additional Headers
 
Support Custom/Additional Headers
The following session parameter parameters can be used to add additional columns to the Audit Log. These columns will get added to the end of the columns.
Configuration parameter
Description
AuditLogger.CustomHeaders
type string
Using this parameter the user is able to log new fields/columns in the audit log. The value to be given as string with new column names separated by comma. This field is mandatory if new custom header is to be added. Repetition of the headers will be ignored. The column names are case-sensitive.
Example: "AuditLogger.CustomHeaders":"NewColumn1, NewColumn2" where NewColumn1 and NewColumn2 are the new columns to be added in the audit log
AuditLogger.CustomFieldMapping
type dictionary<string, dictionary<string, string>>
Using this parameter, the user is able to map a column to a message field for a given message type. All the NEW custom header names mentioned in the parameter should be present in AuditLogger.CustomHeaders too, otherwise the field will be ignored. But to define the mapping for an existing header, it is not necessary to add the header in AuditLogger.CustomHeaders.
Supported message types are:
*NEW ORDER,
*AMEND ORDER,
*CANCEL ORDER,
*ORDER UPDATE,
*D that is, FIX New Order Single,
*G that is, FIX Order Cancel Replace Request,
*F that is, FIX Order Cancel Request,
*8 that is, FIX Execution Report,
*9 that is, FIX Order Cancel Reject,
*j that is, Business Message Reject
Example: "AuditLogger.CustomFieldMapping":"{\"NEW ORDER\":{\"NewColumn1\":\"price\"} ,\"8\":{\"NewColumn2\":\"CumQty\",\"NewColumn1\":\"ClOrdID\"}}"
that is, NewColumn1 will store price for New Order but ClOrdID of FIX Execution report. NewColumn2 will store CumQty of FIX Execution report.
AuditLogger.OverrideFieldMappings
type boolean
By enabling this parameter, the mapping of a column to a message field can be re-configured. Use AuditLogger.CustomFieldMapping parameter to redefine the mapping of the header to a new field(message field or EP field). This parameter is optional, by default it is false.
Example: "AuditLogger.OverrideFieldMappings":"true"
Sample SessionConfiguration events for Audit Logger to add additional columns to it:

com.apama.fix.SessionConfiguration("ILINK_TRADING", {"ilinkUseLegacyMode":
"false","ilinkSwap55and107Tags":"true",
"OrderManager.OrderIDServiceName":"ILINK-FIX",
"FixChannel":"ILINK_FIX", "MAX_ID_NUM":"999999","ID_RANGE":"1000",
"OrderManager.KillOrdersOnSessionDown":"false",
"OrderManager.waitForMarketOrderId":"true","SenderCompID":"F06004N",
"SenderSubID":"Apama","TargetSubID":"G",
"Account":"66600","CustomerOrFirm":"0","CTICode":"3",
"SenderLocationID":"IN","ManualOrderIndicator":"Y",
"Audit.Filename":"AuditTestLog.csv","Audit.FileTruncate":"true",
"EnableAuditLog":"true","Audit.Style":"iLink",
"OrderManager.useMillisecondTransactTimes":"true",
"AuditLogger.CustomHeaders":"NewColumn1,NewColumn2",
"AuditLogger.CustomFieldMapping":"{\"NEW ORDER\":{\"NewColumn1\":\"price\"},
\"8\":{\"NewColumn2\":\"CumQty\",
\"NewColumn1\":\"ClOrdID\"}}","AuditLogger.OverrideFieldMappings":"true"})
Note that all systems connecting to the iLink exchange are required by the CME to produce an approved audit log, so the audit log must not be disabled ,the log files must be retained for a sufficient period as specified by the CME and in case any file access issue make sure that fix those issue before process further.
Note:
It is recommended that you do not use the defaults, as this behaviour breaks the standard Apama abstraction. Use this configuration event:

com.apama.fix.SessionConfiguration("ILINK_TRADING",
{"ilinkUseLegacyMode":"false",
"ilinkSwap55and107Tags":"true","OrderManager.OrderIDServiceName":"ILINK-FIX",
"FixChannel":"ILINK_FIX", "MAX_ID_NUM":"999999","ID_RANGE":"1000",
"OrderManager.KillOrdersOnSessionDown":"false",
"OrderManager.waitForMarketOrderId":"true",
"OrderManager.useMillisecondTransactTimes":"true"})
The configuration parameters iLinkUseExecReportAvgPrice and iLinkUseExecReportCumQty should be set to "false" if the user plans to use the adapter with the standard OMS block.
Sample events:
Placing Order:
com.apama.oms.NewOrder("1","6RH0",32640.0,"SELL","LIMIT",5,
"ILINK-FIX","","","ILINK_TRADING","","apama_admin",{})