Context
I have a test receiver and initiator. I am using QuickFix / N 1.7. Everything works fine if I configure both Acceptor and Initator on FIX 4.4. Do nothing by simply connecting and then logging in / out messages with the remote on the debug console. Everything is OK, see below.
I change nothing but two configuration files, respectively, from FIX 4.4 to FIX 5.0. All work (I mean heartbeat messages, still coming and going), but the callback message parameter is no longer a typical instance message (heartbeat), but a base class.
Diagnostics:
- All specified specification files are in place. If I intentionally messed up the character either in the TransportDataDictionary path or in the AppDataDictionary, I got the expected exception.
- Using specification files outside the box, no settings at all.
Question:
Why is the message instance not a typed instance of the runtime instance in the case of FIX 5.0 and typed in the case of FIX 4.4? Is this the expected behavior or am I missing something?
Code exhibits:
The code in the implementation of the IApplication initiator that creates the output lines is:
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 configuration 4.4, I see the following: (message type 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 configuration and I see the following: (a type of message 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 receiver:
[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