5

Context

I have a test Acceptor and Initiator. I am using QuickFix/N 1.7 release. Everything works fine, if I configure both Acceptor and Initiator to FIX 4.4. Doing nothing, just connecting, then logging the incoming/outgoing heartbeat messages to the debug console. All OK, see below.

I change nothing just the two configuration files accordingly from FIX 4.4 to FIX 5.0. All works (I mean the heartbeat messages still coming and going), but the message parameter of the callback is not a typed (heartbeat) runtime instance message anymore, instead the base class.

Diagnostics:

  • All referenced specification files are in place. If I intentionally ruin a character either in TransportDataDictionary path or AppDataDictionary I got the expected exception
  • Using the out of the box specification files, no customization at all.

Question:

Why the message instance is not a typed runtime instance message in the FIX 5.0 case and typed in the FIX 4.4 case? Is this the expected behavior or am I missing something?

Code Exhibits:

Code in Initiator IApplication implementation which produces the output lines:

public void ToAdmin(Message message, SessionID sessionID)
{
    Debug.WriteLine($@"(A)OUT: {message.GetType()}{message}");
}
public void FromAdmin(Message message, SessionID sessionID)
{
    Debug.WriteLine($@"(A)IN: {message.GetType()}{message}");
}

When using the 4.4 configuration then I see this: (message type is QuickFix.FIX44.Heartbeat)

Logon - FIX.4.4:TEST01->MYACCEPTOR
(A)IN: QuickFix.FIX44.Heartbeat8=FIX.4.4 9=5335=034=249=MYACCEPTOR52=20170715-15:00:31.59656=TEST0110=179
(A) OUT: QuickFix.FIX44.Heartbeat8=FIX.4.4 9=5335=034=249=TEST0152=20170715-15:00:31.60456=MYACCEPTOR10=169
(A) OUT: QuickFix.FIX44.Heartbeat8=FIX.4.4 9=5335=034=349=TEST0152=20170715-15:00:36.61056=MYACCEPTOR10=172
(A) IN: QuickFix.FIX44.Heartbeat8=FIX.4.4 9=5335=034=349=MYACCEPTOR52=20170715-15:00:36.61556=TEST0110=177

When using the 5.0 and configuration then I see this: (message type is just QuickFix.FIX50.Message)

Logon - FIXT.1.1:TEST01->MYACCEPTOR
(A)IN: QuickFix.Message8=FIXT.1.19=5335=034=249=MYACCEPTOR52=20170715-15:06:16.92256=TEST0110=003
(A) OUT: QuickFix.Message8=FIXT.1.19=5335=034=249=TEST0152=20170715-15:06:16.93056=MYACCEPTOR10=002
(A) OUT: QuickFix.Message8=FIXT.1.19=5335=034=349=TEST0152=20170715-15:06:21.93656=MYACCEPTOR10=005
(A) IN: QuickFix.Message8=FIXT.1.19=5335=034=349=MYACCEPTOR52=20170715-15:06:21.94156=TEST0110=001

FIX5.0 configuration for Intiator:

[DEFAULT]
ConnectionType=initiator
ReconnectInterval=2
FileStorePath=store
FileLogPath=log
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y
TransportDataDictionary=..\spec\FIXT11.xml
AppDataDictionary=..\spec\FIX50.xml
SocketConnectHost=127.0.0.1
SocketConnectPort=1111
LogoutTimeout=5
ResetOnLogon=Y
ResetOnDisconnect=Y

[SESSION]
BeginString=FIXT.1.1
DefaultApplVerID=FIX.5.0
SenderCompID=TEST01
TargetCompID=MYACCEPTOR
HeartBtInt=5

FIX5.0 configuration for Acceptor:

[DEFAULT]
ConnectionType=acceptor
SocketAcceptPort=1111
StartTime=00:00:00
EndTime=00:00:00
FileLogPath=log
UseDataDictionary=Y
ResetOnLogon=Y
ResetOnLogout=Y
ResetOnDisconnect=Y

[SESSION]
BeginString=FIXT.1.1
DefaultApplVerID=FIX.5.0
SenderCompID=MYACCEPTOR
TargetCompID=TEST01
FileStorePath=store
TransportDataDictionary=..\spec\FIXT11.xml
AppDataDictionary=..\spec\FIX50.xml
g.pickardou
  • 32,346
  • 36
  • 123
  • 268
  • Can you post the definition of the heartbeat message in both the data dictionaries ? (4.4 & 5.0) ? – Surojit Jul 25 '17 at 22:53
  • Using the exact same definitions as in the original repo (for 4.4 and 5.0) here: https://github.com/connamara/quickfixn/tree/master/spec/fix – g.pickardou Jul 26 '17 at 19:08

1 Answers1

1

The data dictionary for FIX4.4 at quickfixn repository contains -

<message name="Heartbeat" msgtype="0" msgcat="admin">
  <field name="TestReqID" required="N" />
</message>

which is the formal definition of Heartbeat message.

This definition is missing in the FIX 5.0 data dictionary, causing the quickfix engine to consider it as a generic message.

Adding the heartbeat message definition to the FIX 5.0 data dictionary should solve your problem.

Surojit
  • 1,282
  • 14
  • 26
  • 2
    Indeed it is missing. Further examination: even it would be in the 5.0 data dictionary the FIXT1.1 and 5.0 beginstring related hacks in the source prevent to have typed admin messages, do not ask why... – g.pickardou Jul 27 '17 at 20:31