FixAntenna Configuration

FIX Antenna .NET Programmer's Guide

FixEngine configuration file is usually a plain text file formatted like usual INI files, where each value is configured in a separate line in the following form: PropertyName = Value

There are no requirements to a file name, extention and path. When launching, the FE reads the configuration parameters from the file given as an argument to the FixEngineCreate method.

using com.b2bits.FIXAntenna;

// initialization
FixEngine engine = FixEngine.Create("engine.properties");

Relative file path is built starting from the application startup folder so in the example above FixEngine will search for engine.properties file in the root startup folder.

Here is an alphabetically sorted list of all parameters with references to their documentation:

This topic contains the following sections:

AllowEmptyFieldValue

Values: true, false.

Example: AllowEmptyFieldValue = false

If set to "true", raw messages may contain tags without values. They will be ignored. Otherwise an exception will be raised.

Back to the introduction

AllowZeroNumInGroup

Values: true, false.

Example: AllowZeroNumInGroup = false

If set to "true", raw messages may contain leading group tag with 0 value. It will be ignored. Otherwise an exception will be raised.

Back to the introduction

BackupDirectory

Values: absolute or relative (see EngineRoot) path to the file.

Example: BackupDirectory = logs/backup

This folder will be used for message storage files of the backup connections.

Back to the introduction

CheckVersionOfOutgoingMessages

Values: true, false.

Example: CheckVersionOfOutgoingMessages = true

This parameter is an option whereby the version of FIX Protocol used for the outgoing message is validated against that of the established session. If set to "true", the application must use the same version of the protocol as the established session, otherwise an error occurs. If set to "false", the application level message will be sent to the counterparty. The recommended value is "true".

Back to the introduction

ConnectAddress

Values: host name or an IP address.

Example: ConnectAddress = localhost

FixEngine's local IP address to send from. It can be used on a multi-homed host for a FIX Engine that will only send IP datagrams from one of its addresses. If this parameter is commented or empty, the engine will send IP datagrams from any/all local addresses.

Back to the introduction

CreateUnregisteredAcceptorSession

Values: true, false.

Example: CreateUnregisteredAcceptorSession = true

This parameter provides an option whereby FIX Engine will accept a FIX session for which it has no registered application (acceptor). If set to "true", FixEngine establishes a session, all application level messages are rejected (Application Level Reject - type 3). When an application is registered, the behaviour is standard.

If set to "false", Logon messages are ignored in case when there is no currently open acceptor session.

See Sessions: Establishing Session as Acceptor On Demand

Back to the introduction

DelayedProcessing.DeliveryTriesInterval

Values: The value is specified in milliseconds and must be an integer greater than 0.

Example: DelayedProcessing.DeliveryTriesInterval = 500

This parameter specifies the time interval between attempts to deliver an application level message to a registered client application in case the application does not confirm receipt and operation upon the message.

This parameter is required ony if the DelayedProcessing.MaxDeliveryTries parameter is specified.

Back to the introduction

DelayedProcessing.MaxDeliveryTries

Values: The value must be integer and not negative.

This parameter is optional.

Example: DelayedProcessing.MaxDeliveryTries = 10

This parameter specifies the number of attempts that will be made to deliver an application level message to the registered client application. If this value is exceeded, the session will be closed with the logout reason "Application not available".

Back to the introduction

DuplicateResendRequestLimit

Values: The value must be integer and not negative.

Example: DuplicateResendRequestLimit = 0

This parameter specifies the number of ResendRequests to be received before Application::onResendRequestLoop is called. This option is disabled if the value is less than 2.

Back to the introduction

EncryptionConfigFile

Values: absolute or relative path to the file.

This parameter is optional.

Example: EncryptionConfigFile = encryption.properties

Encryption config file.

Back to the introduction

EngineRoot

Values: absolute or relative path to the directory.

To use the default application working directory: EngineRoot = .

The top of the directory tree under which the engine configuration and log files are stored.

Do NOT add a slash at the end of the directory path.

Note Note

For Win32 platforms, the filename-separator character is "\\" or "/"

Back to the introduction

ExtraSafeMode

Values: true, false.

Example: ExtraSafeMode = true

If this parameter is set to "true", file streams are flushed after each I/O operation.

Back to the introduction

ForceSeqNumReset

Values: true, false.

Example: ForceSeqNumReset = true

This parameter allows automaticaly resolving sequence gap problem. When the parameter is set to "true" and outgoing sequence number is 0 (see SessionOutSeqNum), the session uses 141 (TagResetSeqNumFlag) tag in sending/confirming Logon message to reset seqNum at the initiator or acceptor.

Starting from FixAntenna.NET 2.0.5ForceSeqNumReset property supports more choices.

Values:

  • "0" or "false" - Disable ForceSeqNumReset mode
  • "1" or "true" - Enable SeqNum reset at first time of session initiation
  • "2" - Enable SeqNum reset for every session initiation

Back to the introduction

IntradayLogoutTolerance

Values: true, false.

Example: IntradayLogoutTolerance = true

An option not to reset sequence numbers after Logout. Logout sender should initiate session recovery by sending a Logon message with SeqNum = <last outgoing SeqNum> + 1; expecting a reply Logon with SeqNum = <last incoming SeqNum> + 1. If a gap is detected, standard message recovery or gap filling process takes place.

Back to the introduction

LicenseFile

Values: absolute or relative (see EngineRoot) path to the licence file.

Example: LicenseFile = ../../../engine.license

The license file path.

Note Note

For Win32 platforms, the filename-separator character is "\\" or "/"

Back to the introduction

ListenAddress

Values: host name or IP address.

Example: ListenAddress = localhost

FixEngine's local IP address to bind to. It can be used on a multi-homed host for a FIX Engine that will only send IP datagrams from one of its addresses. If this parameter is missing or empty, the engine will send IP datagrams from any/all local addresses.

Back to the introduction

ListenPort

Values: IP port number, must be > 0.

Example: ListenPort = 9100

Engine's listen port. If multiple instances of FixEngine are running simultaneously, they should have different values of the ListenPort parameter.

If Windows Firewall is enabled, we recommend you to add an exception for each application that uses FixEngine rather then opening a port for all applications. See Understanding Windows Firewall.

Back to the introduction

Log.* Settings

There are several setting related to logging behaviour, these settings names begin with Log.

This section contains the following subsections:

Back to the introduction

Log.Device

Values:

  • File - messages will be written to the file.
  • Console - messages will be written to the console.
  • EventLog (Windows specific) - messages will be written to the Windows Event Log.
  • WinDebug (Windows specific) - messages will be written to the OutputDebugString.
  • Syslog (Linux/Unix specific, supported only for C++ FixAntenna) - messages will be written to the system log.

Example: Log.Device = File

Additional properties of the device are specified in the "Log.<name>" section. For instance Log.File contains all properties of the File device

Log.DebugIsOn

Values: true, false

Example: Log.DebugIsOn = true

If true, debug messages will be printed in log file.

Log.NoteIsOn

Values: true, false

Example: Log.NoteIsOn = true

If true, notes messages will be printed in log file.

Log.WarnIsOn

Values: true, false

Example: Log.WarnIsOn = true

If true, warnings messages will be printed in log file.

Log.ErrorIsOn

Values: true, false

Example: Log.ErrorIsOn = true

If true, error messages will be printed in log file.

Log.FatalIsOn

Values: true, false

Example: Log.FatalIsOn = true

If true, fatal error messages will be printed in log file.

Log.Cycling

Values: true, false

Example: Log.Cycling = false

Enables or disables log file cycling.

When enabled, cycling replaces multiple consequence equal logging records by single record with number of repetitions.

Log.File.AutoFlush

Values: true, false

Example: Log.File.AutoFlush = true

If true, system calls Flush() after each log message thus ensuring that infomation is physically written from buffer to a device.

Setting to true decreases program performance; setting to false increases a risk of records loss in case of program failure.

Log.File.Backup.Time

Values: Should be in format 'hh:mm' or 'hh:mm:ss'

Example: Log.File.Backup.Time = 00:00

Optional. Local time when logs should ba backed up (i.e. copied to backup folder).

Log.File.Locked

Values: true, false

Example: Log.File.Locked = false

If set to true then lock file <Log.File.RootDir/Log.File.Name>. lock will be created. This will prevent other instances of the application to use the same file.

Log.File.Name

Values:

Example: Log.File.Name = _log

File name. If more than one category uses files with the same names, the same file will be used simultaniously.

Log.File.Recreate

Values: true, false

Example: Log.File.Recreate = true

If true then file will be recreated on each start. If false then new records will be appended to the existent file.

Log.File.Rotate

Values: true, false

Example: Log.File.Rotate = false

Enables or disables log file rotation.

When enabled rotation controls the size of the log file and when it exceeds specified value renames current log file and continues logging to the newly created file. Renamed file is placed to the specified directory and assigned a growing suffix. Number of such file is limited by special property. When limit is exceeded the oldest file is removed.

Log.File.RootDir

Values: Existing directory, absolute or relative path

Example: Log.File.RootDir = .\

Root directory for log files. It will be concatenated with each file name specified by 'Log.File.Name'

Log.File.TimeZone

Values: Local, UTC

Example: Log.File.TimeZone = 2

Time zone, to that local time should be converted when we need to print a timestamp in log

Log.EventLog.EventSource

Values: string, a name of a valid log source in Windows Event Log.

Example: Log.EventLog.EventSource = TestService

String that specifies the name of the source. The source name must be a subkey of a logfile entry under the EventLog key in the registry. For example, "WinApp" is a valid source name if the registry has the following key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Event Log\Application\WinApp

LogDirectory

Values: absolute or relative to EngineRoot) path to the logs directory.

Example: LogDirectory = logs

This property is the directory path, in which logs of all incoming (if LogIncomingMessages is set to "true") and outgoing FIX messages are stored. It is possible to specify a path related to the EngineRoot directory or an absolute path. For example if LogDirectory is set to \"logs\", the real path will be $(EngineRoot)/logs. The specified directory must exist.

Note Note

For Win32 platforms, the filename-separator character is "\\" or "/"

Back to the introduction

LogFileName

Values: log file name.

Example: LogFileName = fixengine_net.log

If this parameter is commented or empty, the 'engine.log' will be used

Back to the introduction

LogIncomingMessages

Values: true, false.

Example: LogIncomingMessages = false

This property provides an option to log incoming FIX messages (those received) from a counterparty FIX Engine. They will be stored in the directory specified by the LogDirectory parameter in a file with "in" extension.

Back to the introduction

LogonTimeFrame

Values: non-negative integer number in seconds.

Example: LogonTimeFrame = 30

This parameter sets the time period after which a session is non-gracefully terminated if a response is not received to a first "Logon" message (message type A). The corresponding Logout message is sent to the counterparty.

The recommended value is 30 seconds for dedicated connections or private networks. Trading connections via the Internet will require calibration. If it is set to "0", the time period is unlimited. The value must be integer and not negative.

Back to the introduction

LogoutTimeFrame

Values: non-negative integer number in seconds.

Example: LogoutTimeFrame = 10

This parameter sets the time period after which a session is automatically terminated if a response is not received to a "Logout message" (message type 5). This value is in seconds.

The recommended value is 10 seconds for dedicated connections or private networks. Trading connections via the Internet will require calibration.

Back to the introduction

MessageMustBeValidated

Values: true, false.

Example: MessageMustBeValidated = true

This parameter controls the validation of application level messages.

If it is set to "true", all application level messages are validated.

If it is set to "false", the responsibility for message validity rests with the counterparty.

The recommended setting is "true".

Note Note

Please note that session level messages are validated in all cases.

Back to the introduction

MessageTimeToLive

Values: integer and greater than 0, time in milliseconds (seconds*10-3).

Example: MessageTimeToLive = 500

This parameter sets the time period after which message rejecting is started while the session does not exist. The Parameter is optional.

Back to the introduction

Monitoring

There are several setting related to monitoring behaviour, these settings names begin with Monitoring.

This section contains the following subsections:

Note Note

Latest version of FixAntenna.NET does not support Monitoring functionality. Monitoring is suppotred only by C++ version of FixAntenna. We plan to add Monitoring support in the future versions of FixAntenna.NET

Back to the introduction

Monitoring.Enable

Values: true, false

Example: Monitoring.Enable = false

Enables or disables Engine monitoring. In FixAntenna.NET disable monitoring, because it is not supported currently.

Monitoring.AdminSessionDef.*

Use the Monitoring.AdminSessionDef.[Parameter_Name] paremeter to set up properties of the monitoring sessions. Substitute [Parameter_Name] with any of the parameters described in this section.

Example: Monitoring.AdminSessionDef.TargetSubID = MyApplication

In this example TargetSubID (tag 57) will be assigned a value that will be used to identify a specific individual or a unit intended to receive message.

NumberOfWorkers

Values: The value must be integer and greater than zero.

Example: NumberOfWorkers = 10

Number of threads that serve FIX sessions. This is independent of the number of sessions. Changing this value will impact upon the performance of FIX Engine.

The recommended value is 10.

Back to the introduction

OutgoingMessagesStorageSize

Values: The value must be integer and not negative.

Example: OutgoingMessagesStorageSize = 100

This parameter defines the upper limit to the number of outgoing messages that are resent in case of a Resend Request. If it is set to "0", the number of messages is unlimited.

The recommended value is 100 if no data on mean activity is known.

Back to the introduction

ReasonableTransmissionTime

Values: This parameter is specified in percents from Heartbeat interval (i.e. Heartbeat Interval/100). The value must be integer and greater than zero.

Example: ReasonableTransmissionTime = 20

This parameter specifies the delta (increment) to the Heartbeat interval between a TestRequest message being sent by FIX Engine and a Response Heartbeat being received. The session attains a "telecommunication failed state" if no Response Heartbeat message is received after the normal Heartbeat interval plus delta.

For example if no message (application or session level) is received during the Heartbeat interval then Engine sends a TestRequest message. If the required Response Heartbeat message is not received during Heartbeat interval plus Delta, the session moves to the "Telecommunication link failed" state.

The recommended value is 20 (i.e. twenty percent from Heartbeat interval setting).

Back to the introduction

Reconnect.Interval

Values: This value is specified in milliseconds (seconds*10-3) and must be integer and greater than 0.

Example: Reconnect.Interval = 1000

This parameter specifies the time interval between reconnection attempts in order to restore a communications link.

The recommended value is 1000 for dedicated connections and private networks. Internet connections require calibration.

Back to the introduction

Reconnect.MaxTries

Values: This value is integer.

Example: Reconnect.MaxTries = 20

This parameter specifies the number of attempts to restore the session. The session is considered as restored if the telecommunication link was restored and the exchange of Logon messages was successful.

If it is set to "-1", the number of attempts is unlimited. This value is an integer.

Back to the introduction

ResendMessagesBlockSize

Values: integer and not less than 0.

Example: ResendMessagesBlockSize = 1000

Resend Request resends messages by blocks. This parameter defines the number of messages that proceed in a block. By default the parameter is set to 0, i.e. all messages will be resent in one block.

Back to the introduction

ResetSeqNumAfter24hours

Values: true, false.

Example: ResetSeqNumAfter24hours = false

An option to send a Logon message with the ResetSeqNumFlag set after each 24 hour period of session activity to establish a new set of sequence numbers (starting with 1).

This parameter is optional, the default value is "false".

Note Note

This option does not affect sessions which use version 4.0 of the FIX Protocol.

Back to the introduction

SessionStorageType

Values: transient, persistent.

Example: SessionStorageType = persistent

Default storage type of the created sessions. By default persistent storage type is used.

See also FixEngineCreateSession, any of overloads that support a parameter of com.b2bits.FIXAntennaMessageStorageType type.

Back to the introduction

SocketOpPriority

Values: EVEN, AGGRESIVE_SEND.

Example: SocketOpPriority = EVEN

EVEN (default) - share worker thread among all sessions in the Engine. AGGRESIVE_SEND - use dedicated thread to send outgoing messages.

Back to the introduction

ThirdPartyRoutingIsEnabled

Values: true, false.

Example: ThirdPartyRoutingIsEnabled = true

FIX Engine has inbuilt FIX message routing capability and fully supports the "Deliver To On Behalf Of" mechanism as specified by the FIX Protocol.

If this parameter is set to "true", FixEngine will redirect FIX messages automatically to other FIX sessions it maintains.

If this parameter is set to "false", FixEngine will direct all received messages to the client application.

Back to the introduction

TimestampsInLogs

Values: true, false.

Example: TimestampsInLogs = true

An option to write timestamps in the log files. This parameter is optional, the default value is "true".

Back to the introduction

TotalOutgoingStorageMemoryLimit

Values: integer, greater than or equal to 0 (memory size in Mb).

Example: TotalOutgoingStorageMemoryLimit = 0

This parameter specifies the memory size (in MB) allocated to active sessions. 0 - means infinite. When the limit is reached, the "hardest" sessions will be nongracefully terminated.

Back to the introduction

Validation.AdditionalFields

Values: The value syntax is the following

INI
Version:MsgType1:GroupLeadingTag1(ReqTag1, OptTag2?,..), 
GroupLeadingTag1=>NestedGroupLeadingTag1(ReqTag1, OptTag2?,..), 
OptTag1?, optTag2?,..,ReqTagN;Version:MsgType2:..

This parameter allows defining FIX tags that do not belong to the message in compliance with the version specified for a FIX session, but that should still be allowed (or required) instead of causing a rejection of the FIX message.

Note Note

This parameter is obsolete and supported only for backward compatibility. Please use Validation.AdditionalFieldsFileName instead.

Back to the introduction

Validation.AdditionalFieldsFileName

Values: absolute or relative path to the XML file with the definitions of additional fields.

INI
Validation.AdditionalFieldsFileName = additional.xml

XML file can describe not only additional fields, but also changes in validation rules (standard FIX fields can be made required or not required) as well as additional user-defined message types.

Please refer to FIX Protocol Customization and Validation for additional details.

Back to the introduction

Validation.CheckRequiredGroupFields

Values: true, false.

Example: Validation.CheckRequiredGroupFields = true

If true, validation will check required group fields in repeating groups.

Back to the introduction

UnregisteredSessionStorageType

Values: transient, persistent.

Example: UnregisteredSessionStorageType = persistent

Default storage type of the created unregistered sessions. By default the persistent storage type is used. Use the transient value to use transient storage for the sessions.

Back to the introduction

UnregisteredAcceptor.IgnoreSeqNumTooLowAtLogon

Values: true, false.

Example: UnregisteredAcceptor.IgnoreSeqNumTooLowAtLogon = false

This paramter allows resolving seqNum too low problem at logon. If it is set to "true", the session will continue with received seqNum.

Back to the introduction

UnregisteredAcceptor.maxMessagesAmountInBunch

Values: integer from 0 to 1000000.

Example: UnregisteredAcceptor.maxMessagesAmountInBunch = 0

FA is able to combine packages that wait for sending into the socket, this paramter controls the number of messages to be joined. 0 means infinite. The value must be less than 1000000.

Back to the introduction

UnregisteredAcceptor.RejectMessageWhileNoConnection

Values: true, false.

Example: UnregisteredAcceptor.IgnoreSeqNumTooLowAtLogon = false

When it is set to "true", unregistered acceptors will reject messages in case they could not be sent during interval.

Back to the introduction

UnregisteredAcceptor.tcpBufferDisabled

Values: true, false.

Example: UnregisteredAcceptor.tcpBufferDisabled = true

When it is set to "true", the TCP buffer (Nagle algorithm) will be disabled for the unregistered acceptors. Otherwise, TCP may combine and enqueue small packages until the end of timeout.

Back to the introduction

See Also

Other Resources