Skip to main content

Configuration

QuickFIX/J is heavily metadata-driven and relies on a plain text configuration file to manage connection details, session settings, persistence, validation rules, and dictionary paths.

Structure of the Settings File

The configuration file is divided into [DEFAULT] sections and specific [SESSION] sections.

  • [DEFAULT]: Settings defined here apply to all sessions defined subsequently, unless explicitly overridden within a specific session block.
  • [SESSION]: Settings unique to a specific connection instance.

Example Initiator Configuration

[DEFAULT]
ConnectionType=initiator
HeartBtInt=30
ReconnectInterval=5

# Validation
UseDataDictionary=Y
DataDictionary=FIX44.xml
ValidateFieldsOutOfOrder=N
ValidateChecksum=Y

# Logging (using FileLog)
FileLogPath=log

# Persistence (using FileStore)
FileStorePath=data
PersistMessages=Y

[SESSION]
BeginString=FIX.4.4
SenderCompID=MY_FIRM
TargetCompID=EXCHANGE
SocketConnectHost=192.168.1.100
SocketConnectPort=9876
StartTime=00:00:00
EndTime=23:59:00
ResetOnLogon=N

Example Acceptor Configuration

[DEFAULT]
ConnectionType=acceptor
StartTime=00:00:00
EndTime=23:59:00
FileLogPath=log
FileStorePath=data
UseDataDictionary=Y

[SESSION]
BeginString=FIX.4.4
SenderCompID=EXCHANGE
TargetCompID=CLIENT_A
SocketAcceptPort=9877
DataDictionary=FIX44_custom.xml

[SESSION]
BeginString=FIX.4.2
SenderCompID=EXCHANGE
TargetCompID=CLIENT_B
SocketAcceptPort=9878
DataDictionary=FIX42.xml

Key Configuration Parameters

Session & Connection

ParameterDescription
ConnectionTypeDefines the role: initiator (client that dials out) or acceptor (server that listens).
BeginStringThe FIX version for the session (e.g., FIX.4.2, FIX.4.4, FIXT.1.1).
SenderCompIDYour firm's identifier (Tag 49).
TargetCompIDYour counterparty's identifier (Tag 56).
SocketConnectHost(Initiator only) The IP or DNS name to connect to.
SocketConnectPort(Initiator only) The port to connect to.
SocketAcceptPort(Acceptor only) The port to bind and listen on.
HeartBtIntHeartbeat interval in seconds. Defines how often TestRequest or Heartbeat messages are sent.
StartTime / EndTimeDefines the daily or weekly session schedule. Determines when sequence numbers are reset based on the active session boundary.
ResetOnLogonIf Y, forces sequence numbers to reset to 1 every time a Logon occurs.

Validation

ParameterDescription
UseDataDictionarySet to Y to enable structural validation of FIX messages.
DataDictionaryPath to the XML file describing the FIX version specification (e.g., FIX44.xml).
ValidateFieldsOutOfOrderIf N (default Y), allows fields to appear out of the strict order defined in the XML.
ValidateChecksumIf Y, validates the Checksum (Tag 10) at the end of the message.
CheckLatencyIf Y, checks the SendingTime (Tag 52) against the local system clock and rejects messages exceeding MaxLatency (default 120s).

Storage & Logging

ParameterDescription
PersistMessagesIf Y (default), messages are saved to the store for potential recovery via ResendRequest. Set to N for market data feeds.
FileStorePathDirectory where FileStore saves .seqnums and .body files.
FileLogPathDirectory where FileLog saves raw FIX traffic (.messages.log) and engine events (.event.log).
SLF4JLogPrependSessionIDWhen using SLF4J, prepends the SessionID to log output for easier grep filtering.

Programmatic Configuration

While property files are the standard approach, you can also configure QuickFIX/J programmatically by constructing SessionSettings objects:

import quickfix.SessionSettings;
import quickfix.SessionID;

SessionSettings settings = new SessionSettings();

// Set default parameters
settings.setString("ConnectionType", "initiator");
settings.setString("HeartBtInt", "30");

// Set session-specific parameters
SessionID sessionId = new SessionID("FIX.4.4", "SENDER", "TARGET");
settings.setString(sessionId, "SocketConnectHost", "127.0.0.1");
settings.setString(sessionId, "SocketConnectPort", "9876");
settings.setString(sessionId, "StartTime", "00:00:00");
settings.setString(sessionId, "EndTime", "23:59:00");

Full Configuration Options

Configuring QuickFIX/J

A QuickFIX/J acceptor or initiator can maintain as many FIX sessions as you would like. A FIX session is identified by a group of settings defined within the configuration section for a session (or inherited from the default section). The identification settings are:

SettingRequired?
BeginStringY
SenderCompIDY
SenderSubIDN
SenderLocationIDN
TargetCompIDY
TargetSubIDN
TargetLocationIDN

The sender settings are your identification and the target settings are for the counterparty. A SessionQualifier can also be used to disambiguate otherwise identical sessions. Session qualifier usage is not recommended. It is provided for compatibility with QuickFIX JNI and for the nonstandard FIX implementations where there are multiple sessions that would otherwise have the same identification without the qualifier. A SessionQualifier can only be used with an initiator.

Each of the sessions can have several settings associated with them. Some of these settings may not be known at compile time and are therefore passed around in a class called SessionSettings.

The SessionSettings class has the ability to pull settings out of any input stream such as a file stream. You can also simply pass it a filename. If you decide to write your own components (storage for a particular database, a new kind of connector etc.), you may also use the session settings to store settings for your custom component.

A settings file is set up with two types of heading, a [DEFAULT] and a [SESSION] heading. [SESSION] tells QuickFIX/J that a new Session is being defined. [DEFAULT] is a place that you can define settings which will be inherited by sessions that don't explicitly define them. If you do not provide a setting that QuickFIX/J needs, it will throw a ConfigError telling you what setting is missing or improperly formatted.

These are the settings you can associate with a session based on the default components provided with QuickFIX, followed by an example.

QuickFIX/J Settings


Session

IDDescriptionValid ValuesDefault
BeginStringVersion of FIX this session should useFIX.4.4
FIX.4.3
FIX.4.2
FIX.4.1
FIX.4.0
FIXT.1.1 (which then requires DefaultApplVerID, see below)
SenderCompIDYour compID as associated with this FIX sessioncase-sensitive alpha-numeric string
SenderSubID(Optional) Your subID as associated with this FIX sessioncase-sensitive alpha-numeric string
SenderLocationID(Optional) Your locationID as associated with this FIX sessioncase-sensitive alpha-numeric string
TargetCompIDCounterparty's compID as associated with this FIX sessioncase-sensitive alpha-numeric string
TargetSubID(Optional) Counterparty's subID as associated with this FIX sessioncase-sensitive alpha-numeric string
TargetLocationID(Optional) Counterparty's locationID as associated with this FIX sessioncase-sensitive alpha-numeric string
SessionQualifierAdditional qualifier to disambiguate otherwise identical sessions. This can only be used with initiator sessions.case-sensitive alpha-numeric string
DefaultApplVerIDRequired only for FIXT 1.1 (and newer). Ignored for earlier transport versions. Specifies the default application version ID for the session. This can either be the ApplVerID enum (see the ApplVerID field) or the beginString for the default version.String. Examples: DefaultApplVerID=7 (FIX 5.0 via enum), DefaultApplVerID=FIX.5.0 (FIX 5.0 via BeginString), DefaultApplVerID=FIX.4.2 (FIX 4.2 via BeginString)No default. Required for FIXT 1.1
ConnectionTypeDefines if session will act as an acceptor or an initiatorinitiator
acceptor
TimeZoneTime zone for this session; if specified, the session start and end will be converted from this zone to UTC.Time zone ID (e.g. America/New_York, Asia/Tokyo, Europe/London)
StartTimeTime of day that this FIX session becomes activatedTime in the format of HH:MM:SS [timezone]. The time zone is optional. The TimeZone setting will be used, if set, or UTC will be used by default. The timezone string should be one that the Java TimeZone class can resolve. For example, 15:00:00 US/Central.
EndTimeTime of day that this FIX session becomes deactivatedTime in the format of HH:MM:SS [timezone]. The time zone is optional. The TimeZone setting will be used, if set, or UTC will be used by default. For example, 09:00:00 US/Eastern.
StartDayFor week long sessions, the starting day of week for the session. Use in combination with StartTime. Incompatible with Weekdays.Day of week in the default locale (e.g. Monday, mon, lundi, lun, etc.)
EndDayFor week long sessions, the ending day of week for the session. Use in combination with EndTime. Incompatible with Weekdays.Day of week in the default locale (e.g. Monday, mon, lundi, lun, etc.)
WeekdaysFor daily sessions that are active on specific days of the week. Use in combination with StartTime and EndTime. Incompatible with StartDay and EndDay. If StartTime is before EndTime then the day corresponds to the StartTime.Comma-delimited list of days of the week in the default locale (e.g. "Sun,Mon,Tue", "Dimanche,Lundi,Mardi", etc.)
NonStopSessionIf set the session will never reset. This is effectively the same as setting 00:00:00 as StartTime and EndTime.Y
N
N
TimeStampPrecisionDetermines precision for timestamps in (Orig)SendingTime fields. Only available for FIX.4.2 and greater.

NB: This configuration is only considered for messages that are sent out. QuickFIX/J is able to receive UtcTimestamp fields with up to picosecond precision. Please note however that only up to nanosecond precision will be stored, i.e. the picoseconds will be truncated.
SECONDS
MILLIS
MICROS
NANOS
MILLIS
ClosedResendIntervalUse actual end of sequence gap for resend requests rather than using "infinity" as the end sequence of the gap. Not recommended by the FIX specification, but needed for some counterparties.Y
N
N

Validation

IDDescriptionValid ValuesDefault
UseDataDictionaryTell session whether or not to expect a data dictionary. You should always use a DataDictionary if you are using repeating groups.Y
N
Y
DataDictionaryXML definition file for validating incoming FIX messages. If no DataDictionary is supplied, only basic message validation will be done. This setting should only be used with FIX transport versions older than FIXT 1.1. See TransportDataDictionary and ApplicationDataDictionary for FIXT 1.1 settings.Valid XML data dictionary file. QuickFIX/J comes with the following defaults in the etc directory: FIXT11.xml, FIX50.xml, FIX44.xml, FIX43.xml, FIX42.xml, FIX41.xml, FIX40.xml.If DataDictionary is not specified and UseDataDictionary=Y, then QuickFIX/J will look for a default dictionary based on the session's BeginString (e.g., FIX.4.2 = FIX42.xml). The DataDictionary file search strategy is to use a URL, then the file system, and then the thread context classloader (if any), and then the DataDictionary instance's classloader. Default data dictionary files are included in the QuickFIX/J jar file.
TransportDataDictionaryXML definition file for validating admin (transport) messages. This setting is only valid for the FIXT 1.1 (or newer) sessions. See DataDictionary for older transport versions (FIX 4.0–4.4) and for additional information.Valid XML data dictionary file path.If no dictionary path is supplied, an attempt will be made to load a default transport dictionary.
AppDataDictionaryXML definition file for validating application messages. This setting is only valid for the FIXT 1.1 (or newer) sessions. See DataDictionary for older transport versions (FIX 4.0–4.4) and for additional information. This setting supports the possibility of a custom application data dictionary for each session and can be used as a prefix to specify multiple application dictionaries for the FIXT transport. For example: AppDataDictionary=FIX42.xml for the default application version ID, and AppDataDictionary.FIX.4.4=FIX44.xml for any FIX 4.4 messages.Valid XML data dictionary file path.If no dictionary path is supplied, an attempt will be made to load a dictionary using the DefaultApplVerID for the session.
ValidateFieldsOutOfOrderIf set to N, fields that are out of order (i.e. body fields in the header, or header fields in the body) will not be rejected. Useful for connecting to systems which do not properly order fields.Y
N
Y
ValidateFieldsHaveValuesIf set to N, fields without values (empty) will not be rejected. Useful for connecting to systems which improperly send empty tags.Y
N
Y
ValidateUserDefinedFieldsIf set to N, user defined fields (field with tag >= 5000) will not be rejected if they are not defined in the data dictionary, or are present in messages they do not belong to.Y
N
Y
ValidateUnorderedGroupFieldsSession validation setting for enabling whether field ordering is validated.Y
N
Y
FirstFieldInGroupIsDelimiterSession validation setting for enabling whether the first found field in a repeating group will be used as delimiter. ValidateUnorderedGroupFields should be set to N.Y
N
N
ValidateIncomingMessageAllows bypassing the message validation (against the dictionary).Y
N
Y
ValidateSequenceNumbersCheck the next expected target SeqNum against the received SeqNum. If enabled and a mismatch is detected: if lower than expected, logout; if higher, send a resend request. If not enabled and a mismatch is detected, nothing is done. Must be enabled for EnableNextExpectedMsgSeqNum to work.Y
N
Y
ValidateChecksumIf set to N, checksum validation will not be executed on messages. This setting cannot be set to N together with RejectGarbledMessage set to Y; in that case a ConfigError will be thrown.Y
N
Y
AllowUnknownMsgFieldsIf set to Y, non user defined fields (field with tag < 5000) will not be rejected if they are not defined in the data dictionary, or are present in messages they do not belong to.Y
N
N
CheckCompIDIf set to Y, messages must be received from the counterparty with the correct SenderCompID and TargetCompID. Some systems will send you different CompIDs by design, so you must set this to N.Y
N
Y
CheckLatencyIf set to Y, messages must be received from the counterparty within a defined number of seconds (see MaxLatency). It is useful to turn this off if a system uses local time for its timestamps instead of GMT.Y
N
Y
MaxLatencyIf CheckLatency is set to Y, this defines the number of seconds latency allowed for a message to be processed.positive integer120
RejectGarbledMessageIf set to Y, garbled messages will be rejected (with a generic error message in 58/Text field) instead of ignored. This only works for messages that pass the FIX decoder and reach the engine. Messages that cannot be considered a real FIX message (i.e. not starting with 8=FIX or not ending with 10=xxx) will be ignored in any case. See Rejecting Invalid vs Garbled Messages for further explanation.Y
N
N
RejectInvalidMessageIf set to N, only a warning will be logged on reception of a message that fails data dictionary validation. See Rejecting Invalid vs Garbled Messages for further explanation.Y
N
Y
RejectMessageOnUnhandledExceptionIf enabled, an uncaught Exception or Error in the application's message processing will lead to a (BusinessMessage)Reject being sent to the counterparty and the incoming message sequence number will be incremented. If disabled (default), the problematic incoming message is discarded and the message sequence number is not incremented. Processing of the next valid message will cause detection of a sequence gap and a ResendRequest will be generated.Y
N
N
RequiresOrigSendingTimeIf set to N, PossDup messages lacking the OrigSendingTime field will not be rejected.Y
N
Y

Initiator

IDDescriptionValid ValuesDefault
ReconnectIntervalTime between reconnection attempts in seconds. Only used for initiators.positive integer30
HeartBtIntHeartbeat interval in seconds. Only used for initiators.positive integer
LogonTimeoutNumber of seconds to wait for a logon response before disconnecting.positive integer10
LogoutTimeoutNumber of seconds to wait for a logout response before disconnecting.positive integer2
SocketConnectPortSocket port for connecting to a session. Only used with a SocketInitiator.positive integer
SocketConnectHostHost to connect to. Only used with a SocketInitiator.valid IP address in the format of x.x.x.x or a domain name
SocketConnectTimeoutConnection timeout in seconds. Only used with a SocketInitiator.positive integer60
SocketConnectProtocolSpecifies the initiator communication protocol. The SocketConnectHost is not used with the VM_PIPE protocol, but the SocketConnectPort is significant and must match the acceptor configuration.TCP
VM_PIPE
TCP
SocketConnectPort<n>Alternate socket port(s) for connecting to a session for failover or load balancing, where n is a positive integer, i.e. SocketConnectPort1, SocketConnectPort2, etc. Must be consecutive and have a matching SocketConnectHost<n>.positive integer
SocketConnectHost<n>Alternate socket host(s) for connecting to a session for failover or load balancing, where n is a positive integer, i.e. SocketConnectHost1, SocketConnectHost2, etc. Must be consecutive and have a matching SocketConnectPort<n>.valid IP address in the format of x.x.x.x or a domain name
SocketConnectProtocol<n>Alternate socket protocol(s) for connecting to a session for failover or load balancing, where n is a positive integer, i.e. SocketConnectProtocol1, SocketConnectProtocol2, etc. Must be consecutive and have a matching SocketConnectHost & SocketConnectPort. Connection list iteration rules: connections are tried one after another until one is successful; next connection attempt after a successful connection will start at first defined connection again.TCP
VM_PIPE
TCP
SocketLocalPortBind the local socket to this port. Only used with a SocketInitiator.positive integerIf unset the socket will be bound to a free port from the ephemeral port range.
SocketLocalHostBind the local socket to this host. Only used with a SocketInitiator.valid IP address in the format of x.x.x.x or a domain nameIf unset the socket will be bound to all local interfaces.
DynamicSessionLeave the corresponding session disconnected until AbstractSocketInitiator.createDynamicSession is called.Y
N
N

Acceptor

IDDescriptionValid ValuesDefault
SocketAcceptPortSocket port for listening to incoming connections. Only used with a SocketAcceptor.positive integer, valid open socket port
SocketAcceptAddressLocal IP address for binding accept port.A hostname or IP address parsable by java.net.InetAddress.Accept connections on any network interface.
SocketAcceptProtocolSpecifies the acceptor communication protocol. The SocketAcceptAddress is not used with the VM_PIPE protocol, but the SocketAcceptPort is significant and must match the initiator configuration.TCP
VM_PIPE
TCP
AllowedRemoteAddressesList of remote IP addresses which are allowed to connect to this acceptor.Comma-separated list of hostnames or IP addresses parseable by java.net.InetAddress.empty, i.e. all remote addresses are allowed
AcceptorTemplateDesignates a template Acceptor session. See Dynamic Acceptor Sessions.Y
N
N

Secure Communication Options

IDDescriptionValid ValuesDefault
SocketUseSSLEnables SSL usage for QFJ acceptor or initiator.Y
N
N
SocketKeyStoreKeyStore to use with SSL.File path
SocketKeyStorePasswordKeyStore password.
KeyManagerFactoryAlgorithmAlgorithm used when generating an instance of KeyManagerFactory.SunX509
KeyStoreTypeKeyStore type.JKS
SocketTrustStoreTrustStore to use with SSL.File path
SocketTrustStorePasswordTrustStore password.
TrustManagerFactoryAlgorithmAlgorithm used when generating an instance of TrustManagerFactory.PKIX
TrustStoreTypeTrustStore type.JKS
NeedClientAuthConfigures the SSL engine to require client authentication. This option is only useful to acceptors.Y
N
N
EnabledProtocolsProtocols enabled for use with the SSL engine.Java supported protocols
CipherSuitesCipher suites enabled for use with the SSL engine.Java default cipher suites
EndpointIdentificationAlgorithmSets the endpoint identification algorithm. If the algorithm parameter is non-null, the endpoint identification/verification procedures must be handled during SSL/TLS handshaking. See Endpoint Identification Algorithm Names.
UseSNIEnables the SSL engine to use Server Name Indication (SNI). This option is only applicable for initiators. If provided, SNIHostName will be used as the server name. Otherwise, SocketConnectHost or SocketConnectHost<n> will be used. Note: When this option is disabled, the JVM may still implicitly send the SSL server_name extension.Y
N
N
SNIHostNameSNI host name to be used as desired Server Name Indication (SNI) parameter.

Socks Proxy Options (Initiator only)

IDDescriptionValid ValuesDefault
ProxyTypeProxy type.http
socks
ProxyVersionProxy HTTP or Socks version to use.For socks: 4, 4a or 5
For http: 1.0 or 1.1
For socks: (none)
For http: 1.0
ProxyHostProxy server hostname or IP.valid IP address in the format of x.x.x.x or a domain name
ProxyPortProxy server port.positive integer
ProxyUserProxy user.
ProxyPasswordProxy password.
ProxyDomainProxy domain (for http proxy).
ProxyWorkstationProxy workstation (for http proxy).

Socket Options (Acceptor or Initiator)

Acceptor and Initiator socket options can be set in either defaults or per-session settings.

IDDescriptionValid ValuesDefault
SocketKeepAliveWhen the keepalive option is set for a TCP socket and no data has been exchanged across the socket in either direction for 2 hours (NOTE: the actual value is implementation dependent), TCP automatically sends a keepalive probe to the peer. This probe is a TCP segment to which the peer must respond. One of three responses is expected: (1) the peer responds with the expected ACK — TCP will send another probe following another 2 hours of inactivity; (2) the peer responds with an RST, which tells the local TCP that the peer host has crashed and rebooted — the socket is closed; (3) there is no response from the peer — the socket is closed. The purpose of this option is to detect if the peer host crashes.Y
N
SocketOobInlineWhen the OOBINLINE option is set, any TCP urgent data received on the socket will be received through the socket input stream. When the option is disabled (which is the default) urgent data is silently discarded.Y
N
SocketReceiveBufferSizeSet a hint for the size of the underlying buffers used by the platform for incoming network I/O. When used in set, this is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket.Integer value
SocketReuseAddressSets SO_REUSEADDR for a socket. This is used only for MulticastSockets in Java, and it is set by default for MulticastSockets.Y
N
SocketSendBufferSizeSet a hint for the size of the underlying buffers used by the platform for outgoing network I/O. When used in set, this is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket.Integer value
SocketLingerSpecify a linger-on-close timeout. This option disables/enables immediate return from a close() of a TCP Socket. Enabling this option with a non-zero Integer timeout means that a close() will block pending the transmission and acknowledgement of all data written to the peer, at which point the socket is closed gracefully. Upon reaching the linger timeout, the socket is closed forcefully, with a TCP RST. Enabling the option with a timeout of zero does a forceful close immediately. If the specified timeout value exceeds 65,535 it will be reduced to 65,535.Integer value
SocketTcpNoDelayDisable Nagle's algorithm for this connection. Written data to the network is not buffered pending acknowledgement of previously written data.Y
N
Y
SocketTrafficClassSets traffic class or type-of-service octet in the IP header for packets sent from this Socket. As the underlying network implementation may ignore this value applications should consider it a hint. The tc must be in the range 0 <= tc <= 255 or an IllegalArgumentException will be thrown. For Internet Protocol v4 the value consists of an octet with precedence and TOS fields as detailed in RFC 1349. The TOS field is bitset created by bitwise-or'ing values such as: IPTOS_LOWCOST (0x02), IPTOS_RELIABILITY (0x04), IPTOS_THROUGHPUT (0x08), IPTOS_LOWDELAY (0x10). The last low order bit is always ignored as this corresponds to the MBZ (must be zero) bit. Setting bits in the precedence field may result in a SocketException indicating that the operation is not permitted.An integer value or a set of string options separated by | (e.g., "IPTOS_LOWCOST|IPTOS_LOWDELAY")
SocketSynchronousWritesWrite messages synchronously. This is not generally recommended as it may result in performance degradation. The MINA communication layer is asynchronous by design, but this option will override that behavior if needed.Y
N
N
SocketSynchronousWriteTimeoutThe time in milliseconds to wait for a write to complete.Integer30000 ms (30 seconds) if SocketSynchronousWrites is Y
MaxScheduledWriteRequestsNumber of scheduled write requests on which session is forcefully disconnected.positive Integer0 (disabled)

Storage

Note: Unlike in QuickFIX JNI, database-specific classes (MySQLStore, etc.) are not included in QuickFIX/J. Use the JDBC support instead. The message store and logging schema are simple and should be easily adapted to any JDBC-supported database.

IDDescriptionValid ValuesDefault
PersistMessagesIf set to N, no messages will be persisted. This will force QFJ to always send GapFills instead of resending messages. Use this if you know you never want to resend a message. Useful for market data streams.Y
N
Y
FileStorePathDirectory to store sequence number and message files. Only used with FileStoreFactory.valid directory for storing files, must have write access
FileStoreMaxCachedMsgsMaximum number of message index entries to cache in memory.Integer. A zero will not cache any entries.10000
FileStoreSyncWhether the FileStore syncs to the hard drive on every write. It's safer to sync, but it's also much slower.Y
N
N
JdbcDataSourceNameJNDI name for the JDBC data source. This technique for finding the data source can be used as an alternative to specifying the driver details. It allows better integration with application servers and servlet containers that are already configured with JDBC data sources.JNDI name of the data source. Configuration of the initial context must be done by an application server, through a property file or through system properties. See JNDI documentation for more information.
JdbcDriverJDBC driver for JDBC logger. Also used for JDBC log.Class name for the JDBC driver. Specifying driver properties directly will cause the creation of a HikariCP data source that supports connection pooling. If you are using a database with its own pooling data source (e.g., Oracle) then use the setDataSource() method on the Jdbc-related factories to set the data source directly.
JdbcURLJDBC database URL. Also used for JDBC log.Depends on the JDBC database driver.
JdbcUserJDBC user. Also used for JDBC log.
JdbcPasswordJDBC password. Also used for JDBC log.
JdbcStoreMessagesTableNameTable name for messages table.A valid SQL table name.messages
JdbcStoreSessionsTableNameTable name for sessions table.A valid SQL table name.sessions
JdbcLogHeartBeatsControls filtering of heartbeats for message logging (both in and out).Y
N
N
JdbcLogIncomingTableThe name of the JDBC log incoming table.valid table namemessages_log
JdbcLogOutgoingTableThe name of the JDBC log outgoing table.valid table namemessages_log
JdbcLogEventTableThe name of the JDBC log events table.valid table nameevent_log
JdbcSessionIdDefaultPropertyValueThe default value for Session ID bean properties is an empty string. Oracle treats this as a SQL NULL and that causes problems. This configuration setting allows you to set the default value for unspecified Session ID properties.Any nonempty string."" (empty string)
JdbcMaxActiveConnectionSpecifies the maximum number of connections to the database.Positive number32
JdbcMinIdleConnectionControls the minimum number of idle connections that HikariCP tries to maintain in the pool, including both idle and in-use connections. If the idle connections dip below this value, HikariCP will make the best effort to restore them quickly and efficiently.[0, JdbcMaxActiveConnection]Same as JdbcMaxActiveConnection
JdbcMaxConnectionLifeTimeSpecifies the maximum amount of time that a connection exists for before it is killed (milliseconds).Positive28800000 ms (8 hours)
JdbcConnectionTimeoutSet the maximum number of milliseconds that a client will wait for a connection from the pool. If this time is exceeded without a connection becoming available, an SQLException will be thrown from javax.sql.DataSource.getConnection().Non-negative number250 ms
JdbcConnectionIdleTimeoutControls the maximum amount of time that a connection is allowed to sit idle in the pool. Whether a connection is retired as idle or not is subject to a maximum variation of +30 seconds, and average variation of +15 seconds. A connection will never be retired as idle before this timeout. A value of 0 means that idle connections are never removed from the pool.Non-negative number600000 ms (10 minutes)
JdbcConnectionKeepaliveTimeControls the keepalive interval for a connection in the pool. An in-use connection will never be tested by the keepalive thread, only when it is idle will it be tested.Non-negative number0 ms
JdbcConnectionTestQuerySet the SQL query to be executed to test the validity of connections. Using the JDBC4 Connection.isValid() method to test connection validity can be more efficient on some databases and is recommended. If your driver supports JDBC4 we strongly recommend not setting this property.Valid SQL query

Logging

IDDescriptionValid ValuesDefault
FileLogPathDirectory to store logs. Only used with FileLogFactory.valid directory for storing files, must have write access
FileLogHeartbeatsControls logging of heartbeat messages.Y
N
N
FileIncludeMillisecondsControls whether milliseconds are included in log time stamps.Y
N
N
FileIncludeTimeStampForMessagesControls whether time stamps are included on message log entries.Y
N
N
SLF4JLogEventCategoryLog category for logged events. The SLF4J category options support Session ID variables in the category names. The variables are: ${fixMajorVersion}, ${fixMinorVersion}, ${senderCompID}, ${targetCompID}, ${qualifier}. For example, a category value ${senderCompID}.events would become BANZAI.events in the log file if BANZAI is the senderCompID for the session. This can be used with advanced logging libraries like Log4J to create sophisticated session-specific logging policies.Depends on log engine. The SLF4J adapter for JDK 1.4 logging is included by default. See slf4j.org for other options.quickfixj.event
SLF4JLogIncomingMessageCategoryLog category for incoming messages.Depends on log engine. See SLF4JLogEventCategory.quickfixj.msg.incoming
SLF4JLogOutgoingMessageCategoryLog category for outgoing messages.Depends on log engine. See SLF4JLogEventCategory.quickfixj.msg.outgoing
SLF4JLogPrependSessionIDControls whether session ID is prepended to log message.Y
N
Y
SLF4JLogHeartbeatsControls whether heartbeats are logged.Y
N
N
JdbcDriverJDBC driver for JDBC logger. Also used for JDBC message store.Class name for the JDBC driver.
JdbcURLJDBC database URL. Also used for JDBC message store.Depends on the JDBC database driver.
JdbcUserJDBC user. Also used for JDBC message store.
JdbcPasswordJDBC password. Also used for JDBC message store.
ScreenLogShowEventsLog events to screen.Y
N
Y
ScreenLogShowIncomingLog incoming messages to screen.Y
N
Y
ScreenLogShowOutgoingLog outgoing messages to screen.Y
N
Y
ScreenLogShowHeartBeatsFilter heartbeats from output (both incoming and outgoing).Y
N
N

Miscellaneous

IDDescriptionValid ValuesDefault
LogonTagTag/value pair which will be set on sent Logon message. Example: LogonTag=553=foo<tag>=<value>, where tag must be a positive integer and value a String
LogonTag<n>Additional tag/value pairs which will be set on sent Logon message, where n is a positive integer, i.e. LogonTag1, LogonTag2, etc. Must be consecutive. Example: LogonTag=553=user / LogonTag1=554=password<tag>=<value>, where tag must be a positive integer and value a String
RefreshOnLogonRefresh the session state when a Logon is received. This allows a simple form of failover when the message store data is persistent. The option will be ignored for message stores that are not persistent (e.g., MemoryStore).Y
N
N
ResetOnLogonDetermines if sequence numbers should be reset before sending/receiving a logon request.Y
N
N
ResetOnLogoutDetermines if sequence numbers should be reset to 1 after a normal logout termination.Y
N
N
ResetOnDisconnectDetermines if sequence numbers should be reset to 1 after an abnormal termination.Y
N
N
ResetOnErrorSession setting for doing an automatic reset when an error occurs. A reset means disconnect, sequence numbers reset, store cleaned and reconnect, as for a daily reset.Y
N
N
DisconnectOnErrorSession setting for doing an automatic disconnect when an error occurs.Y
N
N
EnableLastMsgSeqNumProcessedAdd tag LastMsgSeqNumProcessed in the header (optional tag 369).Y
N
N
EnableNextExpectedMsgSeqNumAdd tag NextExpectedMsgSeqNum (optional tag 789) on the sent Logon message and use value of tag 789 on received Logon message to synchronize session. This should not be enabled for FIX versions < 4.4. Only works when ValidateSequenceNumbers is enabled.Y
N
N
ResendRequestChunkSizeSetting to limit the size of a resend request in case of missing messages. This is useful when the remote FIX engine does not allow to ask for more than n messages for a ResendRequest. E.g. if the ResendRequestChunkSize is set to 5 and a gap of 7 messages is detected, a first resend request will be sent for 5 messages. When this gap has been filled, another resend request for 2 messages will be sent. If the ResendRequestChunkSize is set to 0, only one ResendRequest for all the missing messages will be sent.any positive integer0 (disables splitting)
ContinueInitializationOnErrorContinue initializing sessions if an error occurs. Useful when having multiple sessions per connector and misconfigured session(s) should not prevent the connector from starting.Y
N
N
SendRedundantResendRequestsAllows sending of redundant resend requests.Y
N
N
TestRequestDelayMultiplierFraction of the heartbeat interval which defines the additional time to wait if a TestRequest sent after a missing heartbeat times out (final coefficient value is equal to TestRequestDelayMultiplier + 1.0).any non-negative value0.5
HeartBeatTimeoutMultiplierFraction of the heartbeat interval which defines the additional time to wait since the last message was received before disconnecting (final coefficient value is equal to HeartBeatTimeoutMultiplier + 1.0).any non-negative value1.4
DisableHeartBeatCheckHeartbeat detection is disabled. A disconnect due to a missing heartbeat will never occur.Y
N
N
ForceResendWhenCorruptedStoreFill in heartbeats on resend when reading from message store fails.Y
N
N
LogMessageWhenSessionNotFoundLog the entire message when the corresponding session can not be found. Otherwise only the SessionID is logged.Y
N
Y
AllowPosDupWhether to allow PossDupFlag and OrigSendingTime when sending messages. This is useful on occasions, primarily when a QFJ application is acting as purely a pass-through/monitoring hop.Y
N
N

Rejecting Invalid vs Garbled Messages

There are mainly two settings that influence QFJ's rejection behaviour:

  • RejectInvalidMessage
  • RejectGarbledMessage

While the first applies to messages that fail data dictionary validation, the latter applies to messages that fail basic validity checks on the FIX protocol level.

Setting RejectInvalidMessage

If RejectInvalidMessage is set to:

  • Y, the problematic message will be rejected (this is the default setting).
  • N, only a warning will be logged on reception of a message that fails data dictionary validation. The message will then be handed over to the application level code.

Setting RejectGarbledMessage

If RejectGarbledMessage is set to:

  • Y, garbled messages will be rejected (with a generic error message in 58/Text field) instead of ignored.
  • N, garbled messages will be ignored and the sequence number will not be incremented (this is the default setting).

Information on garbled messages

In FIX it is legal to ignore a message under certain circumstances. Since FIX is an optimistic protocol it expects that some errors are transient and will correct themselves with the next message transmission. Therefore the sequence number is not incremented and a resend request is issued on the next received message that has a higher sequence number than expected.

In the case that the error is not transient, the default behaviour is not optimal because not consuming a message sequence number can lead to follow-up problems since QFJ will wait for the message to be resent and queue all subsequent messages until the resend request has been satisfied (i.e. infinite resend loop).

What constitutes a garbled message (taken from the FIX protocol specification):

  • BeginString (tag #8) is not the first tag in a message or is not of the format 8=FIXT.n.m.
  • BodyLength (tag #9) is not the second tag in a message or does not contain the correct byte count.
  • MsgType (tag #35) is not the third tag in a message.
  • Checksum (tag #10) is not the last tag or contains an incorrect value.

If the MsgSeqNum (tag #34) is missing, a logout message should be sent terminating the FIX Connection, as this indicates a serious application error that is likely only circumvented by software modification.

You have the possibility to adapt QFJ's behaviour for some of the cases mentioned above.

  • If an incoming message does neither start with the BeginString tag nor does it end with the Checksum tag, the message cannot be passed to the session and will be discarded by the FIX decoder right away.
  • Examples where the message will be rejected instead of ignored when RejectGarbledMessage=Y:
    • incorrect checksum
    • repeating group count field contains no valid integer
    • no SOH delimiter found in field
    • missing MsgType
    • invalid tags, e.g. 49foo=bar

Sample Settings File

Here is a typical settings file you might find in a firm that wants to connect to several ECNs.

# default settings for sessions
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=60
SenderCompID=TW

# session definition
[SESSION]
# inherit ConnectionType, ReconnectInterval and SenderCompID from default
BeginString=FIX.4.1
TargetCompID=ARCA
StartTime=12:30:00
EndTime=23:30:00
HeartBtInt=20
SocketConnectPort=9823
SocketConnectHost=123.123.123.123
DataDictionary=somewhere/FIX41.xml

[SESSION]
BeginString=FIX.4.0
TargetCompID=ISLD
StartTime=12:00:00
EndTime=23:00:00
HeartBtInt=30
SocketConnectPort=8323
SocketConnectHost=23.23.23.23
DataDictionary=somewhere/FIX40.xml

[SESSION]
BeginString=FIX.4.2
TargetCompID=INCA
StartTime=12:30:00
EndTime=21:30:00
# override default setting for ReconnectInterval
ReconnectInterval=30
HeartBtInt=30
SocketConnectPort=6523
SocketConnectHost=3.3.3.3
# (optional) alternate connection ports and hosts to cycle through on failover
SocketConnectPort1=8392
SocketConnectHost1=8.8.8.8
SocketConnectPort2=2932
SocketConnectHost2=12.12.12.12
DataDictionary=somewhere/FIX42.xml