Page tree
Skip to end of metadata
Go to start of metadata

This section describes how to configure FIX Engine and FIX session.

1. Configuring FIX Engine

The FIX Engine is based on the FIX Antenna Java library. 

FIX Engine's basic settings are stored in the fixengine.properties file, located in the conf directory. Refer to the B2BITS FIX Antenna Java Programmer’s Guide for a complete list of FIX Antenna settings.

The fixengine.properties file contains both global B2BITS FIX Antenna settings which can also be FIX session default parameters. 

The fixedge.properties file contains settings of the default FIX server port by which the FIX Antenna listens to incoming data.

Currently, server.port=8911 is used by default.

Additional listening ports can be defined within FIX session configurations (see port property). In this case FIX engine automatically manages their opening and closing according to started sessions.

1.1. Custom FIX dictionaries setup

The custom FIX dictionaries setup in the FIXEdge Java (FEJ) product is based on the FIX Antenna custom FIX dictionaries setup (see FIX Antenna Java custom dictionaries), but there are certain FIXEdge Java configuration specifics that are described below.

Follow these steps to set up FIX dictionaries:

  1. Place the customFIXVersions section into the default fixengine.properties file (located in the conf directory) to set up custom FIX version info for all FIX sessions.

    fixengine.properties
    # comma separated list of custom FIX dictionary aliases
    customFixVersions=FIX44Custom,FIX50Custom
    
    # pair of 'fixVersion' and 'fileName' for each FIX dictionary alias with pattern:
    # customFixVersion.<custom FIX version alias>.fixVersion=<base standard FIX version>
    # customFixVersion.<custom FIX version alias>.fileName=<custom FIX dictionary file name>
    
    # example of custom FIX dictionary based on FIX.4.4
    customFixVersion.FIX44Custom.fixVersion=FIX.4.4
    customFixVersion.FIX44Custom.fileName=classpath:fixdic44-custom.xml
    
    # examples of custom FIX dictionary based on FIX.5.0
    customFixVersion.FIX50Custom.fixVersion=FIX.5.0
    customFixVersion.FIX50Custom.fileName=classpath:fixdic50-custom.xml
    
  2. Set the defined dictionary aliases as a session's fixVersion or appVersion in the appropriate FIXEdge Java session configuration file 's_fix_[SESSION_ID].properties':

    s_fix_session1.properties
    # FIXEdge Java session configuration properties
    
    fixVersion=FIX44Custom
    s_fix_session2.properties
    # FIXEdge Java session configuration properties
    
    fixVersion=FIX50Custom

    NOTE: Changes that are made in the fixengine.properties file will only be applied after the FIXEdge server restarts.

2. Configuring FIX Session

For establishing and managing FIX sessions, the FIX Antenna Java library is used. FEJ also introduces a per-file base configuration for each FIX session. All such configuration files are placed into subdirectories of the conf/session directory and should follow the s_fix_[SESSION_ID].properties mask (this behavior can be changed with the sessionConfigManager bean into fej-server.xml). Additionally, each subdirectory may have the s_fixDefault.properties configuration file which defines a common option for all groups of the FIX session.

To add a new FIX session, the s_fix_[SESSION_ID].properties file is used with new session settings. 

To modify the FIX session, changes to the s_fix_[SESSION_ID].properties file should be made.

To apply changes to the FIX session, the following options are available:

  • Restart the FIXEdge Java server by using the administrative instruments (all sessions will be initialized in this case)
  • Load or reload the session configuration from the FIXICC app (refer to the FIXICC & FEJ Integration User Guide)

NOTE: Changes, which are made in the fixengine.properties will be applied to FIX engine and sessions only after FIXEdge server restart.

For monitoring available sessions and their states, use the administrative tools (SSH, JMX), or FIXICC.

FIX session configuration options:

(You can find the advanced options for the FIX session on the FIX Antenna Java configuration page.)

Property nameDefault valueRequired for session initiatorRequired for session acceptorDescription

sessionType

acceptor

YesYes

Session type. If type is not defined the session will be resolved as an acceptor.

Valid values: acceptor/initiator.

host


Yes

The connecting host for the initiator session.

port


Yes

The connecting port for the initiator session or the listening port for the acceptor session.

For the session initiator, this is the assigned value used to identify a password to send in the logon message.

For the session acceptor, this is the value that is used for validating the pw received in the logon request.

The FIXEdge server accepts a session of this kind only on the defined port.

senderCompID


YesYes

The assigned value used to identify a firm that sends the message.

senderSubID




The assigned value is used to identify a specific message originator (desk, trader, etc.)

senderLocationID




The assigned value used to identify a specific message originator’s location (i.e. geographic location and/or desk, trader).

targetCompID


YesYes

The assigned value used to identify a receiving firm.

targetSubID




The assigned value used to identify a specific individual or a unit intended to receive the message.

targetLocationID




The assigned value used to identify a specific message destination’s location (i.e. geographic location and/or desk, trader)

fixVersion


YesYes

A version of the FIX protocol, version of the transport protocol when using FIX 5.0-FIX 5.0 SP2 (FIXT1.1) or a custom version (see Custom FIX dictionaries setup)

FIX.4.0, FIX.4.1, FIX.4.2, FIX.4.3, FIX.4.4, FIXT.1.1

appVersion




A version of the application-level protocol or a custom version (see Custom FIX dictionaries setup)

Valid values: FIX.4.0, FIX.4.1, FIX.4.2, FIX.4.3, FIX.4.4, FIX.5.0, FIX.5.0SP1, FIX.5.0SP2

backupHost




Backup host for initiator session

backupPort




Backup port for initiator session

incomingSequenceNumber

0



An initial incoming sequence number

outgoingSequenceNumber

0



An initial outgoing sequence number

heartbeatInterval

30



Heartbeat interval (in seconds)

fixFieldList




User-defined fields for messages. If this list is not empty, the Engine adds it to each outgoing message.

outgoingLoginFixFieldList




Additional fields for the outgoing Logon message

groups




A comma-separated list of routing groups

username




The assigned value used to identify a username to send in the Logon message for an initiator session and a username to validate with the user name from the Logon request for a session acceptor. The session will still be accepted if the username is not defined.

password




The assigned value used to identify a password to send in the Logon message for the session initiator and the password to validate
with the password from the Logon request for the session acceptor. The session will be accepted if the password is not defined.

disposeOnDisconnect

false

Disposes the FIX session when another side breaks the connection or in case of disconnection. More details about session statuses can be found in the FIX Antenna Java documentation.

NOTE: If the property is set to true, then the reconnect logic will be suppressed.

NOTE: The FIX session can be started or stopped only if scheduling is applied. Otherwise, the session will be inactive. Refer to the Scheduler configuration section where the session start procedure is specified.

2.1 Timestamps in storages

FIX Antenna Java library provides the ability to mark storages and messages inside them with timestamps. This feature is supported only for storages with human-readable formats

Incoming and outgoing message storages could contain the FIX sessions start timestamps in their names.

Configuration options:

Property nameDefault valueDescription

storageNameTimestamped

false

'True' enables timestamps being shown in storage file names. The placeholder {3} in 'incomingLogFile' and 'outgoingLogFile' patterns will be replaced with the timestamp related to log file creation or the sequence reset procedure.

storageTimestampFormat

yyyy-MM-dd_HH-mm-ss

This is a SimpleDateFormat pattern.

Please make sure to avoid delimiter chars that are not valid for file system file names.

incomingLogFile

{0}.in

Incoming storage file name pattern.

  • {0} will be replaced with the actual sessionID
  • {1} with the actual SenderCompID
  • {2} with the actual TargetCompID
  • {3} can be replaced with the timestamp (see 'storageNameTimestamped')
  • {4} with the actual session qualifier.

Possible values: {0}-{3}.in, {3}-{0}.in

outgoingLogFile

{0}.out

Outgoing storage file name pattern.

  • {0} will be replaced with the actual sessionID
  • {1} with the actual SenderCompID
  • {2} with the actual TargetCompID
  • {3} can be replaced with the timestamp (see 'storageNameTimestamped')
  • {4} with the actual session qualifier.

Possible values: {0}-{3}.out, {3}-{0}.out

If the option storageNameTimestamped is enabled and the storage filename includes the session start timestamp, during the backup procedure this file will be moved to a backup folder with the same name. Otherwise, if the filename does not contain a timestamp, the file will be copied by the FIX Engine backup procedure with a timestamp to support the uniqueness of the file in the backup folder.

By default, human-readable storages include a millisecond timestamp for each message. This behavior is flexible and can be changed. For example, it's possible to disable timestamps to minimize latency and save time for timestamp generation. Or, it's possible to increase the precision of timestamps if there is a need for better statistics.

Please pay attention the fact that, by default, messages are marked with a timestamp at the moment they are stored. However, for incoming messages, it possible to store the timestamp of the message reading by enabling the markIncomingMessageTime option, which slightly increases the latency.

Options for incoming messages:

Property nameDefault valueDescription

timestampsInLogs

trueAbility to write timestamps in the in/out log files.

timestampsPrecisionInLogs

MilliThe desired precision of timestamps in the in/out log files.
Valid values: Milli | Micro | Nano.

markIncomingMessageTime

false

If set to 'true', transport will set the additional time mark in nanoseconds for incoming messages right after read data from the socket.


AbstractFIXTransport.getLastReadMessageTimeNano() method could return this value.

2.2 Secure connection configuration

FIXEdge Java supports configuring secure transport for each session separately. For an acceptor session, the configuration will be applied to the new listening port if it is defined in the session configuration.

Configuration options:

PropertyDefault value Description

enableSSL

falseEnable secure transport for the session.

keyStorePath


Path to a Keystore that contains private keys for secure connection

keyStorePassword


Keystore password

trustStorePath


Path to a Truststore. Usually contains a chain of trusted certificates.

trustStorePassword


Truststore password

sslKeystoreType

JKSThe type of Keystore.
See the Keystore section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard types.
Examples of value: JKS, JCEKS, PKCS12, PKCS11

sslTruststoreType

JKSThe type of Truststore.
See the KeyStore section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard types.
Examples of value: JKS, JCEKS, PKCS12, PKCS11

sslKeystoreKeyAlias


Alias filter for used entities in Keystore. Only the keys with a defined alias will be used for a secure connection if this property is defined.

sslTruststoreKeyAlias


Alias filter for used entities in Truststore. Only the certificates with a defined alias will be used for a secure connection if this property is defined.

sslProtocol

TLSv1.2SSL protocol.
See the SSLContext section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard protocol names.
Examples of value: SSL, SSLv2, SSLv3, TLS, TLSv1, TLSv1.1, TLSv1.2

keyManagerAlgorithm

SunX509Key manager factory algorithm name (see Customizing the Default Key Managers and Trust Managers). Possible values are SunX509, PKIX.

trustManagerAlgorithm

SunX509Trust manager factory algorithm name (see Customizing the Default Key Managers and Trust Managers). Possible values are SunX509, PKIX.

sslServerNeedClientAuth

falseMust be defined if authentication is required for the server-side socket. This option only work for acceptor sessions.

Sample configuration for an initiator FIX session with secure connection:

host=localhost
port=3000
senderCompId=initiator
targetCompId=target
        
# Define options for secure connection
enableSSL=true
keyStorePath=conf/ssl/keystore.jks
keyStorePassword=keypass
trustStorePath=conf/ssl/truststore.jks
trustStorePassword=trustpass
  • No labels