Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 39 Next »

Overview

FIX Antenna reads the configuration parameters by default from the engine.properties file during initialization.

The user can also assign another name for the configuration file, such as the Engine::FixEngine::init(const std::string& aPropertiesFileName = "") call parameter.

For example:

 

Engine::FixEngine::init("FE.properties")

Engine parameters

EngineRoot

The top of the directory tree under which the engine's configuration and log files are kept.

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

ListenPort

Optional. Engine's listen port.

Supports multiple values delimited by comma.

LogFileName

OptionalEngine's log file name.

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

ListenAddress

OptionalEngine's local IP address to bind to.

It can be used on a multi-homed host for a FIX Engine that will only accept connect requests to one of its addresses. If this parameter is commented or empty, the engine will accept connections to any/all local addresses.

LicenseFile

The license file path.

LogDirectory

This property is the path of the directory in which the logs for 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. For example if LogDirectory is set to "logs" then the real path is /logs. The specified directory must exist.

ConnectAddress

OptionalEngine's local IP address to send messages from.

It is used only for multi-homed hosts If this parameter is commented or empty, the engine will send IP datagrams from any/all local addresses.

NumberOfWorkers

Number of threads that serve FIX sessions (heartbeat generation/check, message rejecting, message delay delivering, etc) On Linux the recommended value is 2.

On other platforms the recommended value is 10. The value must be integer and greater than zero.

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

Session parameters

LogonTimeFrame

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. This value is in seconds. 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", then the time period is unlimited. The value must be integer and not negative.

LogoutTimeFrame

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. The value must be integer and greater than 0.

IntradayLogoutTolerance

An option not to reset sequence numbers after Logout.

Logout sender should initiate session recovery by sending Logon message with SeqNum = <last outgoing="" seqnum>=""> + 1; expecting reply Logon with SeqNum = <last incoming="" seqnum>=""> + 1. If a gap is detected, standard message recovery or gap filling process takes place.

ReasonableTransmissionTime

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 then the session moves to the state "Telecommunication link failed". This parameter is specified in (Heartbeat Interval/100). The recommended value is twenty percent.

ForceSeqNumReset

This parameter allow to resolve sequence gap problem automatically.

When mode is ON session uses 141(ResetSeqNumFlag) tag in sending/confirming Logon message to reset SeqNum at the initiator or at the acceptor. Valid 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.

ForceSeqNumResetOnLogon

This parameter allow to reset SeqNum after every logon automatically.

DuplicateResendRequestLimit

Specifies how much same ResendRequests received before Application::onResendRequestLoop is called.

This option is disabled if value is less than 2.

AdditionalParsersList

This parameter defines custom raw FIX parser list delimeted by semicolon.

Format of the value: [PARSER_NAME@][FIXT_PROTOCOL1:APP_PROTCOL1,[APP_PROTCOL1[, ...]]| [APP_PROTCOL1] ; ... Examples of one entry. Entries can be combined with semicolon to define more than one parser:

  • FIX44;
  • FIXT11:FIX50SP2;
  • FIXT11:FIX50SP2,FIX50SP1;
  • MyFixParser:FIX50SP2,FIX50SP1.

ThirdPartyRoutingIsEnabled

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" then Engine will redirect FIX messages automatically to other FIX sessions it maintains if OnBehalfOfCompID field in the message is defined. If this parameter is set to "false" Engine directs all messages received to the client application.

DelayedProcessing.DeliveryTriesInterval

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

The value is specified in milliseconds. The value must be integer and greater than 0. This parameter is required only if the DelayedProcessing.MaxDeliveryTries parameter is specified.

DelayedProcessing.MaxDeliveryTries

Optional. 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 then the session will be closed with the logout reason "Application not available". The recommended value is 10. The value must be integer and not negative.

Reconnect.Interval

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

This value is specified in milliseconds (seconds*10-3). The recommended value is 1000 for dedicated connections and private networks. Internet connections require calibration. The value must be integer and greater than 0.

Reconnect.MaxTries

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", then the number of attempts is unlimited. This value is integer.

MessageTimeToLive

OptionalThis parameter sets the time period after which a message rejecting is starting while session isn't exists.

Value is specified in milliseconds (seconds*10-3), must be integer and > 0.

CheckVersionOfOutgoingMessages

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" 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. The recommended value is "true".

Changing this value will impact upon the performance of FIX Engine. In the development should be true. In production should be false.

ResendMessagesBlockSize

Resend Request resend messages by blocks.

This parameter defines how many messages proceed in block. By default parameter is 0 - all messages will be resend in one block. The value must be integer and not less than 0.

ResetSeqNumAfter24hours

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

The default value is false.

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

DictionariesFilesList

This parameter contains name of the XML file with extensions of the FIX protocols.

EncryptionConfigFile

Encryption config file.

TotalOutgoingStorageMemoryLimit

Specifies total amount of the memory (in MB) that active session may use.

0 - means infinite. When limit is reached, the "hardest" sessions will be closed non-gracefully.

Debug.LogSessionExtraParameters

If this property value is true, all session parameters will be printed to the engine.log file.

Storages

LogIncomingMessages

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 extension "in".

Changing this value will impact upon the performance of FIX Engine. In the development should be true. In production should be false.

OutgoingMessagesStorageSize

This parameter defines the upper limit to the number of outgoing messages that are resent in the event of a Resend Request.

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

Changing this value will impact upon the performance of FIX Engine. Large storage increases application working set.

ExtraSafeMode

If this parameter is true than file streams are flushed after each I/O operation.

Changing this value will impact upon the performance of FIX Engine. In the development and in production should be true.

TimestampsInLogs

Optional. An option to write timestamps in the log files.

The default value is true.

Changing this value will impact upon the performance of FIX Engine. In the development should be true. In production should be false.

EnableIncrementalLogFileCreation

Setting property "true" will reserve 10Mb of disc space for logging.

If log reaches 10Mbs, another 10Mbs will be reserved and so on. When property is "true" FixAntenna performance is greatly increased.

Persistents.LogIncrementSize

Specifies amount of memory in bytes reserved for memory mapped file message storage for *.out/*.in files.

It defines how FIX Antenna reserves space on the HDD for PersistentMM (in any cases) and Persistent (if EnableIncrementalLogFileCreation is ON). It is recommended to set large enough value to minimize number of resizes during the storage life time. Each resize can cause latency spike.

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

Persistents.IdxIncrementSize

Specifies amount of memory in bytes reserved for memory mapped file message storage for *.idx file It defines how FIX Antenna reserves space on the HDD for PersistentMM (in any cases) and Persistent (if EnableIncrementalLogFileCreation is ON).

It is recommended to set large enough value to minimize number of resizes during the storage life time. Each resize can cause latency spike.

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

SplitPersistentMsgStorage.BackupDir

This property is the path of the directory, where sliced message storage will search for log files in case they not found in primary location.

It is user responsibility to move files from primary location to backup. Default value is empty - backup path disabled.

SplitPersistentMsgStorage.MaxSliceSize

Specifies maximum size of one slice for sliced message storage.

Storage slices are created with step, specified with Persistents.LogIncrementSize parameter value. If MaxSliceSize value is no multiple of Persistents.LogIncrementSize, result file size will be less, than specified. If value is less than LogIncrementSize, LogIncrementSize value will be used.

Recommended value: any multiple of Persistents.LogIncrementSize Default value is 500000000 - 500Mb.

SessionStorageType

Default storage type of the created unregistered sessions.

By default persistent storage type used. Use "transient" value to use transient storage for the sessions.

Deprecated: Use UnregisteredAcceptor.SessionStorageType instead.

MessageStorage.IndexRebuildEnabled

If this parameter is true, FIX Engine will try to restore index file from log file in case when index file is missed or corrupted This parameter is optional, default value is false.

Please be carefully enabling this property, restoring process uses some heuristic algorithms, and some data(not messages) could be missed.

MessageStorage.RequireRejectFlagSupport

Optional. If this option is enabled, FIX Engine will not rebuild index files for message storages, that does not support embedded Reject Flag Marker. The default value is true.

Unregistered Acceptors parameters

CreateUnregisteredAcceptorSession

This parameter provides an option whereby FIX Engine will accept a FIX session for which it has no registered application (an acceptor).

If set to "true" Engine accepts incoming connection and creates corresponding Session object. If there is no Application associated with session, all application level messages are rejected with Application Level Reject(3) message. If an application is registered behaviour is as standard. If set to false then Logon messages are ignored and incoming connection is dropped. Property is obsolete, UnregisteredAcceptor.CreateSession should be used instead.

UnregisteredAcceptor.CreateSession

This parameter provides an option whereby FIX Engine will accept a FIX session for which it has no registered application (an acceptor).

If set to "true" Engine accepts incoming connection and creates corresponding Session object. If there is no Application associated with session, all application level messages are rejected with Application Level Reject(3) message. If an application is registered behavior is as standard. If set to false then Logon messages are ignored and incoming connection is dropped.

UnregisteredAcceptor.IgnoreSeqNumTooLowAtLogon

This parameter allow to resolve seqNum too low problem at logon.

When it true - session continue with received seqNum.

UnregisteredAcceptor.maxMessagesAmountInBunch

FA able to join packages that wait for sending into the socket, this parameters controls how many messages could be joined.

0 means infinite. Value should be less than 1000000.

UnregisteredAcceptor.RejectMessageWhileNoConnection

When true, unregistered acceptors will reject messages in case they couldn't be sent during interval.

UnregisteredAcceptor.tcpBufferDisabled

When true, the TCP buffer (Nagle algorithm) will be disabled for the unregistered acceptors.

Otherwise, TCP may join and enqueue small packages until timeout ends.

UnregisteredAcceptor.SessionStorageType

Default storage type of the created unregistered sessions.

By default persistent storage type used. Use "transient" value to use transient storage for the sessions.

UnregisteredSessionStorageType

Default storage type of the created unregistered sessions.

By default persistent storage type used. Use "transient" value to use transient storage for the sessions.

Deprecated: Use UnregisteredAcceptor.SessionStorageType instead.

Message Validation parameters

Detailed information about Message Validation parameters is available here: How to configure FIX messages validation

Logging parameters

Log.File.Format

Custom format of log file record. Can be defined separately for each log file e.g. Log.Version.File.Format = ...

Format string can contain any symbols and keywords:

  • %% - put '%' symbol;
  • %level - put severity level name: 'ERROR', 'WARN' etc.;
  • %tablevel - put extra spaces for vertical alignment of records after %level;
  • %date{FIX} - date in 'YYYYMMDD-HH:MM:SS.sss' format;
  • %date{ISO8601} - date in 'YYYY-MM-DD HH:MM:SS,sss' format;
  • %date - date in 'DD MMM YYYY HH:MM:SS,sss' format;
  • %timezone - time zone abbreviation or name (setup TZ env variable to take abbreviation in windows) or 'UTC';
  • %logger - log category, component;
  • %thread - thread id;
  • %message - logged message.

Default value:

Log.File.Format = [%level] %tablevel%date{FIX} [%thread] [%logger] - %message

Log.Cycling

Enables/disables log file cycling.

Valid values:

  • true - to enable cycling;
  • false - to disable cycling.

Log.Device

Default target devices.

Valid 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) - messages will be written to the system log.

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

Log.EventLog.EventSource

String that specifies the name of the source. The source name must be a subkey of a log file 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".

Log.File.AutoFlush

If set to true then buffer will be flushed after each logging call.

If set to false then flush is not called.

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

Log.File.Backup.Time

Optional. Local time when logs should be backed up.

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

Log.File.Locked

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

Valid values:

  • true - lock log file;
  • false - do not lock log file.

Log.File.Recreate

If true then file will be recreated on each start.

If false then new records will be appended to the existent file.

Log.File.RootDir

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

Log.File.Rotate

Enables/disables log file rotation.

Valid values:

  • true - to enable rotation;
  • false - to disable rotation.

Log.File.TimeZone

Time zone of the log message timestamp.

Valid values:

  • Local - display time as local;
  • UTC - display time as UTC.

Log.File.Name

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

Log.DebugIsOn

Enable Debug messages.

Valid values:

  • true - to enable Debug messages;
  • false - to disable Debug messages.

Log.ErrorIsOn

Enable Error messages.

Valid values:

  • true - to enable Error messages;
  • false - to disable Error messages.

Log.FatalIsOn

Enable Fatal Error messages.

Valid values:

  • true - to enable Fatal Error messages;
  • false - to disable Fatal Error messages.

Log.NoteIsOn

Enable Note messages.

Valid values:

  • true - to enable Note messages;
  • false - to disable Note messages.

Log.WarnIsOn

Enable Warning messages.

Valid values:

  • true - to enable Warning messages;
  • false - to disable Warning messages.

Affinity parameters

WorkerCpuAffinity

Defines an affinity mask for all worker pool threads.

Default value is 0.

HelperCpuAffinity

Defines an affinity mask for dispatcher and other auxiliary threads threads.

Default value is 0.

CpuAffinity

Specifies affinity mask for dedicated threads of session. It makes sense only for aggressive modes.

Default value is 0.

RecvCpuAffinity

Specifies affinity mask for dedicated receiving thread of session. It makes sense only for aggressive receive mode.

Default value is 0.

SendCpuAffinity

Specifies affinity mask for dedicated sending thread of session. It makes sense only for aggressive send mode.

Default value is 0.

Backup parameters

BackupDirectory

Relative path to the backup folder.

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

EnableAutoSwitchToBackupConnection

EnableCyclicSwitchBackupConnection

Monitoring parameters

Monitoring.AdminSessionDef.DisableTCPBuffer

When true TCP buffer (Nagle algorithm) will be disabled for session.

Monitoring.AdminSessionDef.EncryptMethod

The expected value of the encryption method.

Monitoring.AdminSessionDef.ForceSeqNumResetMode

Force SeqNum reset mode.

An option to use 141 tag in Logon message to reset sequence number.

Monitoring.AdminSessionDef.IgnoreSeqNumTooLowAtLogon

When true, session ignore 'SeqNum too low' at incoming Logon message and continue with received SeqNum.

Monitoring.AdminSessionDef.IntradayLogoutToleranceMode

Intraday logout tolerance mode.

An option to reset or not to reset sequence numbers after Logout.

Monitoring.AdminSessionDef.MaxMessagesAmountInBunch

Enqueued outgoing messages could merged and sent as a single buffer.

This parameter controls how many messages could be merged into the bunch. The 0 means infinite amount.

Monitoring.AdminSessionDef.Password

The expected value of the Password (Tag 554) field in the incoming Logon message.

If the real value is not equal to the expected one then the session is disconnected without sending a message and the error condition is generated in the log output.

Monitoring.AdminSessionDef.SenderLocationID

SenderLocationID (tag 142) - assigned value used to identify specific message originator's location (i.e. geographic location and/or desk, trader).

Monitoring.AdminSessionDef.SocketOpPriority

Priority of the socket SendReceive operations.

Valid values:

  • EVEN (default) - share worker thread among all session in the Engine;
  • AGGRESSIVE_SEND - use dedicated thread to send outgoing messages;
  • AGGRESSIVE_RECEIVE - use dedicated thread to send outgoing messages.

Monitoring.AdminSessionDef.SourceIPaddress

The expected value of the source IP address.

If the real value is not equal to the expected one then the session is disconnected without sending a message and the error condition is generated in the log output.

Monitoring.AdminSessionDef.TargetLocationID

TargetLocationID_ (tag 143) - assigned value used to identify specific message destination's location (i.e. geographic location and/or desk, trader).

Monitoring.AdminSessionDef.TargetSubID

TargetSubID (tag 57) - assigned value used to identify specific individual or unit intended to receive message.

Monitoring.AdminSessionDef.Username

The expected value of the Username (Tag 553) field in the incoming Logon message.

If the real value is not equal to the expected one then the session is disconnected without sending a message and the error condition is generated in the log output.

Monitoring.ListenPort

The engine TCP listen port that is enabled for administrative sessions If port is configured it will be added to set of engine listen ports and administrative sessions will be accepted on this port only If not exists or empty common engine listen ports are used to accept administrative sessions.

Measuring.Enable

Enables/disables Engine measuring.

Valid values:

  • true - to enable Engine measuring;
  • false - to disable Engine measuring.

If this parameter omitted, it is "false" by default.

Monitoring.Enable

Enables/disables Engine monitoring.

SSL parameters

SSLCACertificate

Optional. Engine's SSL CA certificate file path.

SSLCertificate

Mandatory if ListenSSLPort is not empty. Engine's SSL certificate file path.

SSLCheckPrivateKey

OptionalEngine's SSL option whatever to check if private key matches certificate.

ListenSSLPort

OptionalEngine's listen SSL port.

Supports multiple values delimited by comma.

SSLPrivateKey

Mandatory if ListenSSLPort is not empty. Engine's SSL certificate's private key file path.

SSLProtocols

Mandatory. Engine's SSL protocols to use.

It is a comma separated list of protocols to use. Valid values are SSLv2, SSLv3, TLSv1, TLSv1_1, TLSv1_2.

SSLRequireClientCertificate

OptionalWhatever client's certificate is mandatory.

Decline clients without certificate if true. The default value is false.

Other parameters

AnchorFile

Myricom.Dbl.TcpListenAddresses

OptionalDBL TCP listen address and port.

Format: <XXX.XXX.XXX.XXX>:<port>.

Myricom.Dbl.UseSocketAdaptor

OptionalThis property tells how will be initialized Myricom DBL TCP API.

If true it will be used SocketAdaptor to emulate DBL API via generic sockets. Default value is false.

EnableDnsEntrySpoofingDetection

When it's set to true there is being enabled backward resolve based DNS entry spoofing detection mechanism in DNS related functions.

This option is disabled by default.
If the parameter is enabled, user should use Fully Qualified Domain Name (FQDN) or IP addresses as configuration/function parameters (e.g. 'workstation1.epam.com' instead of 'workstation1'). Otherwise errors about DNS spoofing will be reported.

FailOver.CommandPort

FailOver.Host

FailOver.IsPrimary

FailOver.Mode

FailOver.Port

KeepMillisecondsInUTCTimeFields

Defines how to serialize UTCTime* filed values: 0 - default mode - keep milliseconds if it is not 0 1 - always serialize milliseconds 2 - always truncate millisecond By default this parameter is 0.

It is global option for FixEngine. It works only when a value is passed as Engine::UTCTime*.

Dispatcher parameters

Dispatcher.RecvWorkersCount

Defines number of workers to handle incoming messages.

Default value is 3

Dispatcher.RecvWorkersTimeout

Defines number of milliseconds to wait for readiness of the socket to receive data.

-1 means no polling (low CPU usage but higher latency). 0 means infinite polling without delay (decreases latency but causes 100% CPU usage). Default is -1.

Dispatcher.SendWorkersCount

Defines number of workers to handle outgoing messages.

Default is 1.

Dispatcher.SendWorkersTimeout

Defines number of milliseconds to wait for readiness of the socket to send data.

-1 means no polling (low CPU usage but higher latency). 0 means infinite polling without delay (decreases latency but causes 100% CPU usage). Default is -1.

Threads configuration

Linux

After upgrading to FIX Antenna v2.10.16 Linux users should check engine.properties file. Threads related to data sending/receiving are isolated from each other and from other tasks. Therefore two new optional settings in the engine.properties has been added:

Also each send/receive thread pool can operate in busy loop. Therefore two optional settings has been added to define epoll request timeout.

The meaning of the NumberOfWorkers has been changed. Now it defines number of general purpose workers. General purpose workers maintain heartbeats, reconnects, rejecting and other functionality not related to sending/receiving data.

Example

Following engine.properties settings will make FixEngine to create 5 threads. 3 threads for data processing, 1 thread to send data, 1 thread for general purpose stuffs.

 
Dispatcher.RecvWorkersCount = 3
Dispatcher.SendWorkersCount = 1
NumberOfWorkers = 1
 

Windows

On Windows number of threads which serve FIX sessions is defined by NumberOfWorkers parameter. Recommended value is 10. It is suitable for most systems. But if you application handles more than 6 sessions which actively send/receive data and your server has more than 6 CPU Cores, try to increase number of threads. Suitable parameter value should be distinguished during testing.

  • No labels