The following parameters of messages validation in FIX Antenna C++/.NET can be configured in the engine.properties:

Engine Level properties

Parameter name
Available values
Description
MessageMustBeValidated

true
false

This parameter is equal to Session.Default.Validation.IsEnabled but has lower priority.

This parameter is required.

The recommended value is "true".

CheckVersionOfOutgoingMessages
true
false 

This parameter is an option whereby the version of FIX protocol used for the outgoing message is validated against that of the established session. It's used for outgoing messages only.

If set to “true” then the application must use the same version of the protocol as the established session otherwise an error occurs. If set to “false” then the application level message will be sent to the counterparty regardless of the version of the protocol. The recommended value is “true”.

WARNING! Changing this value will impact upon the performance of FIX Engine.

In the development should be “true”. In production should be “false”.

This parameter is required.

Session Level properties

Parameter name
Available values
Description
Session.<SenderId>/<TargetId>.AllowMessageWithoutPossDupFlag

 

true
false

This parameter is an option whereby the repeated messages are received without PossDupFlag (43) field. It's used for incoming messages only.

If set to “true” and a message is received with a sequence number less than expected without PossDupFlag (43), a message will be processed. If set to “false”, the connection will be closed. The default value is “false”.

This parameter is optional.

Session.<SenderId>/<TargetId>.ValidateCheckSum
true
false

This parameter is an option whereby CRC validation for incoming messages can be controlled. It's used for incoming messages only.

If set to “true” session will be processed. If set to “false session skips CRC validation for incoming messages. The default value is “true”.

This parameter is optional.

Session.<SenderId>/<TargetId>.IgnoreSeqNumTooLowAtLogon
true
false

This parameter is an option whereby session is processed if sequence number in Logon message is lower than expected. It allows to resolve ‘SeqNum too low’ problem at logon. It's used for incoming messages only.

If set to “true” ‘SeqNum too low’ at incoming Logon message is ignored and session will be continued with received ‘SeqNum’. If set to “false” and sequence number in Logon message is lower than expected connection will be closed. The default value is “false”.

This parameter is optional.

Session.<SenderId>/<TargetId>.Validation.IsEnabled
true
false

This parameter is an option whereby validation in messages (application and session levels) can be controlled.

If set to "true" all application messages will be validated. If set to "false" validation of the messages will be skipped.

This parameter is optional. The default value is  "true".

Session.<SenderId>/<TargetId>.Validation.IgnoreUnknownFields
true
false

WARNING! Changing this value will impact the performance of FIX Engine.

This parameter is an option whereby undefined fields can be ignored during incoming message parsing (both session and application messages). It's used for incoming messages only.

If set to “true” any field that is unknown to the dictionary will be ignored. If set to “false” all unknown fields will be stored in the list on the heap. The default value is “false”.

NOTE! In case when IgnoreUnknownField = true it has priority over all other validation settings. For example, even if MessageMustBeValidated = true, or ProhibitUnknownTags = true unknown fields are ignored.

Should be set to “false” for development (and all unknown fields should be listed in the dictionary file), and to “true” for production because if set to “false” FIX Engine stores all unknown fields in the FIX Message in the list on the heap. If set to"true" it would ignore these fields thus limit storage on the heap.

This parameter is optional.

Example (to ignore unknown fields):

IsEnabled = true/false (doesn't matter)

IgnoreUnknownFields = true

Session.<SenderId>/<TargetId>.Validation.ProhibitUnknownTags
true
false

This parameter is an option whereby unknown fields handling can be controlled. It's used for outgoing and incoming messages.

If set to “true” the engine will reject messages with unknown tags in the fields. If set to “false” then all fields with unknown tags will be stored in the message. The default value is “false”.

This parameter is optional.

Example (to reject unknown tags):

IsEnabled = false

IgnoreUnknownFields = false

ProhibitUnknownTags = true/false

MessageMustBeValidated = true

Session.<SenderId>/<TargetId>.Validation.ProhibitTagsWithoutValue
true
false

This parameter is an option whereby fields without values in messages can be prohibited.  It's used for incoming messages (application level) and outgoing messages (both session and application levels).

When the engine receives an incoming message without value, an "exception" is created. If set to “true” exception will be fired. The counterparty will receive a reject session message (35=3). If set to “false” the raw message may contain tags without values - they will be ignored. The default value is “true”.

This parameter is optional.

Example (to prohibit tags without value):

IsEnabled = false

ProhibitTagsWithoutValue = true

Session.<SenderId>/<TargetId>.Validation.VerifyTagsValues
true
false

This parameter is an option whereby tag values verification can be controlled. It's used for outgoing messages.

If set to “true”, then all tag values in messages are verified on the basis of engine vocabulary. If set to “false”, then the responsibility for message validity rests with the counterparty. The default value is true.

This parameter is optional.

Session.<SenderId>/<TargetId>.Validation.VerifyRepeatingGroupBounds
true
false

This parameter is an option whereby repeating group size verification can be controlled. It's used for incoming messages.

If set to “true”, engine will reject messages with incorrect repeating group size. If set to “false”, message will be passed to the application layer. In this case the responsibility for message validity rests with the counterparty. The default value is “true”.

This parameter is optional.

Prior to FIX Antenna version 2.28.1, this parameter was called Validation.VerifyReperatingGroupBounds.

Session.<SenderId>/<TargetId>.Validation.CheckRequiredGroupFields
true
false

This parameter is an option whereby the validation of required fields in repeating group can be controlled. It's used for outgoing and incoming messages.

If set to “true”, then repeating groups will be checked for presence of required and conditionally required fields. If set to “false”, then the responsibility for repeating group validity rests with the counterparty. The default value is “true”.

The recommended setting is “true”.

This parameter is optional.

Session.<SenderId>/<TargetId>.Validation.ProhibitDuplicatedTags
true
false

This parameter is an option whereby incoming messages with duplicated tags can be processed. It's used for incoming messages.

If set to “true” incoming messages with duplicated tags will be rejected with the following message:

"Tag appears more than once [RefSeqNum: _, RefTagID: _, RefMsgType: _]".

If set to “false” raw message may contain duplicated field definitions. The default value is “true”. This parameter is optional.

In engine.properties file, the option can be defined:

  • for all sessions:

    Session.Default.Validation.ProhibitDuplicatedTags = true
  • for a specific session:

    Session.<SenderId>/<TargetId>.Validation.ProhibitDuplicatedTags = true
Session.<SenderId>/<TargetId>.GenerateCheckSum
true
false
Generation of CRC.

Please note FIX Antenna engine removes Zero-sized groups on sending.

How to set default values for session level parameters in the engine.properties file

Just use the following syntax

Session.Default.<ParameterName>

for example

Session.Default.IgnoreSeqNumTooLowAtLogon = true

Troubleshooting

FIX Engines rejects a message with zero-sized Repeating Group

Log records: 

FixEdge.log
2019-07-26 09:51:23,102 UTC   WARN    [Engine]  18100  Session <FIXEDGE, FIXCLIENT> : Validation error: Required tag NoMDEntries (268) is missing in message Market Data - Snapshot/Full Refresh (W) with sequence number 2.

FIXEdge sends the reject to the counterparty:

Outgoing logs
20190726-09:51:23.102 : 8=FIX.4.4|9=236|35=3|49=FIXEDGE|56=FIXCLIENT|34=2|142=SLocationId|143=TLocationId|52=20190726-09:51:23.102|45=2|371=268|372=W|373=1|58=Required tag NoMDEntries (268) is missing in message Market Data - Snapshot/Full Refresh (W) with sequence number 2.|10=225|


Reason: FIX Engine expects that required Repeating Group should contain more than zero entries. 

Example of incoming message: 

20190726-09:51:23.102 : 8=FIX.4.4|9=86|35=W|49=FIXCLIENT|56=FIXEDGE|34=2|52=20190726-09:51:23.101|262=0|55=USD/RUB_TOD|268=0|10=153|


Solutions 

There are two ways to solve the issue:

  1. Make the starting tag in RepeatingGroup in dictionary not required. E.g.:
    <field tag="268" name="NoMDEntries" req="N">

  2. Disable validation by setting false for MessageMustBeValidated parameter in engine.properties:

    engine.properties
    MessageMustBeValidated = false
    



  • No labels