ZagTrader

QuickFIX Session Settings Explained: Configuration Reference

Written and maintained by ZagTrader. Last reviewed . How this page is sourced and checked

Every QuickFIX engine starts from a settings file: a [DEFAULT] section with values every session shares, and one [SESSION] section per session. This page explains the settings people use most, which engines support each one, and the default when it is left out. Defaults were read from each engine's source code and its manual at the releases named in Sources, since the two do not always agree.

How the file works

  • A [SESSION] section inherits everything from [DEFAULT] and can override any of it.
  • BeginString, SenderCompID and TargetCompID, plus SessionQualifier when used, identify the session. Two sections with the same three values are the same session.
  • Names are written exactly as shown here. Values Y and N are used for on and off.
  • Missing required settings stop the engine at start with a configuration error that names the setting. Read that error first; it is usually precise.
An initiator with one FIX 4.4 session
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=30
FileStorePath=store
FileLogPath=log
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y

[SESSION]
BeginString=FIX.4.4
SenderCompID=BUYSIDE
TargetCompID=SELLSIDE
SocketConnectHost=fix.example.com
SocketConnectPort=9876
HeartBtInt=30
DataDictionary=FIX44.xml

Session identity

Which session a section of the file defines. BeginString, SenderCompID and TargetCompID (plus SessionQualifier) form the session ID.

SettingEnginesDefaultWhat it does
BeginString
FIX.4.0 to FIX.4.4, FIXT.1.1
All threerequiredThe FIX version, sent in BeginString (8) on every message. FIX 5.0, 5.0 SP1 and 5.0 SP2 sessions use FIXT.1.1 and name the application version in DefaultApplVerID. FIX.5.0SP2 is not a valid BeginString.
SenderCompID
text, case sensitive
All threerequiredYour CompID, sent in SenderCompID (49). It must match what the counterparty has configured for you, character for character.
TargetCompID
text, case sensitive
All threerequiredThe counterparty's CompID, sent in TargetCompID (56). An acceptor uses the incoming Logon's CompIDs, reversed, to find the session; a mismatch means the session is not found.
SessionQualifier
text
All threenoneTells two initiator sessions apart when they share BeginString and CompIDs. All three engines refuse it on an acceptor.
ConnectionType
initiator, acceptor
All threerequiredInitiator connects out and sends the first Logon; acceptor listens. Usually set once in [DEFAULT].
DefaultApplVerID
ApplVerID code (9) or name (FIX.5.0SP2)
All threerequired for FIXT.1.1The application version for a FIXT.1.1 session, sent in DefaultApplVerID (1137) on the Logon. Ignored on FIX 4.x sessions. All three engines refuse to start a FIXT.1.1 session without it.

Connection and heartbeats

Who connects to whom, where, and how the session keeps itself alive.

SettingEnginesDefaultWhat it does
SocketConnectHost
host name or IP address
All threeinitiator: requiredWhere the initiator connects. Add SocketConnectHost1, SocketConnectHost2 and so on (with matching ports) for backup addresses tried in turn.
SocketConnectPort
port number
All threeinitiator: requiredThe counterparty's port. Backup ports are SocketConnectPort1, SocketConnectPort2, numbered like the hosts.
SocketAcceptPort
port number
All threeacceptor: requiredThe port an acceptor listens on. QuickFIX C++ expects it in [DEFAULT].
HeartBtInt
seconds
All threeinitiator: requiredHeartbeat interval, sent in HeartBtInt (108) on the Logon. Only the initiator sets it; an acceptor takes the value from the Logon it receives. Agree the number with the counterparty: some acceptors refuse other values.
ReconnectInterval
seconds
All threeJ: 5 (in code), N and C: 30Pause between connection attempts of an initiator. QuickFIX/J's code uses 5 seconds when the setting is absent although its manual lists 30, so set it explicitly. QuickFIX/J also accepts a schedule such as 3x5;30: three tries 5 seconds apart, then every 30 seconds.
LogonTimeout
seconds
All three10How long the initiator waits for the Logon answer before it drops the connection.
LogoutTimeout
seconds
All three2How long a session waits for the Logout answer before it drops the connection.
CheckLatency
Y, N
All threeYRejects messages whose SendingTime (SendingTime (52)) is further from the local clock than MaxLatency. A wrong clock on either side, or local time instead of UTC, fails this check.
MaxLatency
seconds
All three120The allowed difference for CheckLatency. A breach is a Reject with 373=10, followed by a Logout.
LogonTag
tag=value
QuickFIX/JnoneAdds fields to the Logon from the settings file, for example LogonTag=553=user and LogonTag1=554=secret. QuickFIX/n and QuickFIX C++ add credentials in the toAdmin callback instead.

Schedule

When the session is allowed to be logged on, and when a new session period starts. A new period resets sequence numbers.

SettingEnginesDefaultWhat it does
StartTime
HH:MM:SS
All threerequired unless NonStopSession=YStart of the session period, in UTC unless a time zone is configured. QuickFIX/J also accepts a zone after the time, such as 07:00:00 Asia/Riyadh.
EndTime
HH:MM:SS
All threerequired unless NonStopSession=YEnd of the session period. Outside StartTime to EndTime the session logs out and refuses to log on. With the same value for both, the period lasts 24 hours and a new one starts at that time each day.
StartDay
day name
All threenoneFirst day of a weekly session, used with StartTime. Must come with EndDay.
EndDay
day name
All threenoneLast day of a weekly session, used with EndTime. A weekly session keeps its sequence numbers from StartDay to EndDay.
Weekdays
list of days, e.g. Sun,Mon,Tue,Wed,Thu
QuickFIX/J, QuickFIX/nnoneA daily session that only runs on the listed days. Cannot be combined with StartDay or EndDay. QuickFIX/J reads the day names in the JVM's default locale, so English names fail on a server with another locale.
NonStopSession
Y, N
All threeNThe session never ends on a schedule, so sequence numbers never reset by time. QuickFIX/n and QuickFIX C++ refuse StartTime, EndTime, StartDay or EndDay next to it.
TimeZone
time zone ID
QuickFIX/J, QuickFIX/nUTCTime zone for StartTime and EndTime. QuickFIX/J uses Java zone IDs such as Asia/Dubai and stops with an error on an ID it does not know. QuickFIX/n passes the ID to the operating system, so check it resolves on the host.
UseLocalTime
Y, N
QuickFIX/n, QuickFIX C++NReads StartTime and EndTime in the host's local time. Messages still carry UTC. QuickFIX/n refuses it together with TimeZone.

For Sunday to Thursday markets and time zones, see session schedules and time zones.

Sequence numbers and recovery

When sequence numbers go back to 1, and how resends are handled.

SettingEnginesDefaultWhat it does
ResetOnLogon
Y, N
All threeNAn initiator resets both sequence numbers to 1 before each Logon and sends 141=Y; an acceptor resets when a Logon arrives. Use it only when the counterparty expects a reset at every logon.
ResetOnLogout
Y, N
All threeNResets both numbers to 1 after a normal Logout exchange.
ResetOnDisconnect
Y, N
All threeNResets both numbers to 1 whenever the connection drops, even without a Logout. Messages not yet delivered are not recovered.
RefreshOnLogon
Y, N
All threeNReloads sequence numbers and messages from the store at logon. Used for a standby engine that shares the store with the primary.
PersistMessages
Y, N
All threeYWith N, sent messages are not kept and every ResendRequest is answered with a gap fill. Fine for market data, wrong for orders.
SendRedundantResendRequests
Y, N
All threeNSends a ResendRequest for every gap even when one is already outstanding. Some certification scripts require Y.
EnableNextExpectedMsgSeqNum
Y, N
QuickFIX/JNSends NextExpectedMsgSeqNum (789) on the Logon and uses the counterparty's value to resynchronise. QuickFIX C++ calls the setting SendNextExpectedMsgSeqNum. FIX 4.4 and later only.

Resetting at the wrong moment is the main cause of "MsgSeqNum too low". See resetting sequence numbers safely.

Dictionaries and validation

Which data dictionary checks incoming messages, and how strict the checks are.

SettingEnginesDefaultWhat it does
UseDataDictionary
Y, N
All threeYChecks incoming messages against a data dictionary. With N there is no field validation and repeating groups are not parsed into groups.
DataDictionary
path to XML
All threeJ and N: FIX44.xml style nameThe dictionary for a FIX 4.x session. When it is absent, QuickFIX/J and QuickFIX/n look for a file named after the BeginString without dots, for example FIX44.xml. Not used on FIXT.1.1 sessions.
TransportDataDictionary
path to XML
All threeJ and N: FIXT11.xmlFIXT.1.1 only: the dictionary for the header, trailer and session messages, normally the FIXT11.xml that ships with the engine.
AppDataDictionary
path to XML
All threenoneFIXT.1.1 only: the dictionary for application messages of the DefaultApplVerID version. Add AppDataDictionary.FIX.4.4=FIX44.xml style lines for other versions on the same session.
ValidateUserDefinedFields
Y, N
All threeYWith N, user-defined fields (tag 5000 and above) that the dictionary does not define, or does not allow in that message, are accepted.
AllowUnknownMsgFields
Y, N
All threeNWith Y, standard fields (below tag 5000) that the dictionary does not allow in that message are accepted. QuickFIX/n notes that fields inside repeating groups are still checked.
ValidateFieldsOutOfOrder
Y, N
All threeYWith N, header fields found in the body (or body fields in the header) are not rejected.
ValidateFieldsHaveValues
Y, N
All threeYWith N, empty fields such as 58= are not rejected with 373=4.
ValidateLengthAndChecksum
Y, N
QuickFIX/n, QuickFIX C++YWith N, messages with a wrong BodyLength or CheckSum are processed. QuickFIX/J has ValidateChecksum for the checksum.
AllowUnknownEnumValues
Y, N
QuickFIX/J, QuickFIX/nNWith Y, values outside a field's enumeration are accepted instead of rejected with 373=5. In QuickFIX/J from 3.0; not in the 2.3 line (checked in 2.3.2).
ValidateUnorderedGroupFields
Y, N
QuickFIX/JYChecks the order of fields inside repeating groups. With N, QuickFIX/J accepts group members in any order after the first.
FirstFieldInGroupIsDelimiter
Y, N
QuickFIX/JNQuickFIX/J 3.0 and later: takes the first field received in a group as its delimiter instead of the dictionary's first field. Needs ValidateUnorderedGroupFields=N.
CheckCompID
Y, N
All threeYRejects messages whose CompIDs do not match the session with 373=9 and logs out. Turn off only when the counterparty sends other CompIDs by design.

Store and logs

Where sequence numbers, sent messages and logs are kept.

SettingEnginesDefaultWhat it does
FileStorePath
directory
All threenoneWhere the file store keeps sequence numbers and sent messages. Must be writable, persistent and used by one process at a time.
FileLogPath
directory
All threenoneWhere the file log writes the messages log and the event log of each session.
FileIncludeTimeStampForMessages
Y, N
QuickFIX/JNQuickFIX/J writes messages without a timestamp unless this is Y. Set it, with FileIncludeMilliseconds=Y, so the log shows when each message went in or out.
FileLogBackupPath
directory
QuickFIX C++FileLogPathWhere QuickFIX C++ writes backup copies of its session logs. Defaults to the FileLogPath directory.
TimeStampPrecision
SECONDS, MILLIS, MICROS, NANOS
QuickFIX/JMILLISPrecision of SendingTime on messages QuickFIX/J sends. QuickFIX/n and QuickFIX C++ spell it TimestampPrecision (QuickFIX/n: Seconds to Nanoseconds; QuickFIX C++: 0 to 9 digits). Agree it with the counterparty: some accept milliseconds only.

SSL and TLS

Each engine names its TLS settings differently. See the SSL guide for a working setup per engine.

SettingEnginesDefaultWhat it does
SocketUseSSL
Y, N
QuickFIX/JNTurns on TLS for a QuickFIX/J initiator or acceptor. The key store comes from SocketKeyStore and the trust store from SocketTrustStore.
SSLEnable
Y, N
QuickFIX/nY if SSLCertificate is setTurns on TLS for QuickFIX/n. With it come SSLServerName, SSLCertificate, SSLCACertificate and SSLValidateCertificates.
SSLProtocol
e.g. all -SSLv2 -SSLv3
QuickFIX C++all -SSLv2TLS versions QuickFIX C++ allows, used with its SSL initiator and acceptor classes. The SSL settings must sit in [DEFAULT].

The full set per engine, with the usual handshake errors, is in QuickFIX SSL and TLS setup.

Questions

What does ResetOnLogon do in QuickFIX?
An initiator with ResetOnLogon=Y sets both sequence numbers to 1 and sends its Logon with ResetSeqNumFlag (141) = Y. An acceptor with it resets when a Logon arrives. The default is N.
Does an acceptor need HeartBtInt?
No. The initiator sets the interval in HeartBtInt (108) on its Logon, and the acceptor uses that value.
Are StartTime and EndTime in local time?
No, in UTC, unless you set TimeZone (QuickFIX/J, QuickFIX/n), add a zone after the time (QuickFIX/J) or set UseLocalTime=Y (QuickFIX/n, QuickFIX C++).
Why does my session reset every day although I never set a reset?
Each new schedule period starts with sequence numbers at 1. With StartTime and EndTime only, the period is one day. Use StartDay and EndDay for a weekly session, or NonStopSession=Y.

The FIX side of the problem

What the error means on any FIX engine, with example messages you can open in the parser:

Reference

Sources

  1. QuickFIX/J user manual: Configuration
  2. QuickFIX/J source: Session.java (setting names, defaults, logout and reject texts)
  3. QuickFIX/J source: DefaultSessionFactory.java (required settings and defaults)
  4. QuickFIX/J source: DefaultSessionSchedule.java (StartTime, Weekdays, TimeZone)
  5. QuickFIX/J source: ValidationSettings.java (validation defaults)
  6. QuickFIX/J source: FileLogFactory.java (log settings and defaults)
  7. QuickFIX/J source: SSLSupport.java (SSL settings and defaults)
  8. QuickFIX/n documentation: Configuration
  9. QuickFIX/n source: SessionFactory.cs (required settings, dictionaries)
  10. QuickFIX/n source: SessionSchedule.cs (Weekdays, TimeZone, UseLocalTime)
  11. QuickFIX C++ documentation: Configuration
  12. QuickFIX C++ source: SessionSettings.h (setting names)

Setting names, defaults and message texts were checked against the projects' source code and documentation on the review date shown at the top of the page. Behaviour can change between releases; check the version you run. This guide is independent and not affiliated with the QuickFIX projects.

See also

More QuickFIX guides