How to configure FIX messages validation

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

Engine-level properties

Parameter name
Available values
Description

MessageMustBeValidated

true
false

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

The recommended value is 'true'.

CheckVersionOfOutgoingMessages

true
false 

Changing this value will impact the performance of FIX Engine.

Required. This parameter is an option whereby the version of the 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'.

In the development should be 'true'. In production should be 'false'.

AllowZeroNumInGroup

true
false

Optional. This parameter defines whether the Engine should accept repeating groups with a group size equal to '0' and no entries.

If set to 'true', FIX Engine will accept messages as is. If set to 'false' and the VerifyTagsValues parameter is set to 'false' then the empty group will be removed from the message. Otherwise, the message will be rejected with the ERROR.

The default value is 'false'.

Session-level properties

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

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

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

Session.<SenderId>/<TargetId>.ValidateCheckSumtrue
false

Optional. This session parameter defined whether the CRC validation for incoming messages can be controlled. It's used for incoming messages only.

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

Session.<SenderId>/<TargetId>.IgnoreSeqNumTooLowAtLogontrue
false

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

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

Session.<SenderId>/<TargetId>.Validation.IsEnabledtrue
false

Optional. This session 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.

The default value is  'true'.

Session.<SenderId>/<TargetId>.Validation.IgnoreUnknownFieldstrue
false

Changing this value will impact the performance of FIX Engine.

Optional. This session 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'.

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 limiting storage on the heap.

Example (to ignore unknown fields):

IsEnabled = true/false (doesn't matter)

IgnoreUnknownFields = true

Session.<SenderId>/<TargetId>.Validation.ProhibitUnknownTagstrue
false

Optional. This session parameter is an option whereby unknown field 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'.

Example (to reject unknown tags):

IsEnabled = false

IgnoreUnknownFields = false

ProhibitUnknownTags = true/false

MessageMustBeValidated = true

Session.<SenderId>/<TargetId>.Validation.ProhibitTagsWithoutValuetrue
false

Optional. This session 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'.

Example (to prohibit tags without value):

IsEnabled = false

ProhibitTagsWithoutValue = true

Session.<SenderId>/<TargetId>.Validation.VerifyTagsValuestrue
false

Optional. This session 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'.

Session.<SenderId>/<TargetId>.Validation.VerifyRepeatingGroupBoundstrue
false

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

If set to 'true', the engine will reject messages with incorrect repeating group size. If set to 'false', the 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'.

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

Session.<SenderId>/<TargetId>.Validation.CheckRequiredGroupFieldstrue
false

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

If set to 'true', then repeating groups will be checked for the 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'.

Session.<SenderId>/<TargetId>.Validation.ProhibitDuplicatedTagstrue
false

Optional. This session 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' the raw message may contain duplicated field definitions. The default value is 'true'. This parameter is optional.

In the 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>.Validation.AllowZeroNumInGrouptrue
false

Optional. This session parameter defines whether the Engine should accept repeating groups with a group size equal to '0' and no entries.

If set to 'true', FIX Engine will accept messages as is. If set to 'false' and the VerifyTagsValues parameter is set to 'false' then the empty group will be removed from the message. Otherwise, the message will be rejected with the ERROR.

The default value is 'false'.

Session.<SenderId>/<TargetId>.GenerateCheckSumtrue
false
Optional. This session parameter enables the generation of CRC.

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

Just use the 'Session.Default.<ParameterName>' syntax, for example, 'Session.Default.IgnoreSeqNumTooLowAtLogon = true'.