0

This is the server config file

[DEFAULT]
ConnectionType=acceptor
SocketAcceptPort=5001
SocketReuseAddress=Y
StartTime=00:00:00
EndTime=00:00:00
FileLogPath=log
FileStorePath=store
[SESSION]
BeginString=FIX.4.4
SenderCompID=EXECUTOR
TargetCompID=CLIENT1
DataDictionary=/home/idf/Documents/quickfixspec/spec/FIX44.xml

I have a FIXServer and FIXClient quickfix application. The client on connection immediately shows:

IN: 8=FIX.4.4|9=197|35=X|34=34|49=EXECUTOR|52=20141114-19:12:07.219|56=CLIENT1|55=bond3|110=0|268=1|269=0|270=100.272681729868|271=0|278=1862140492|279=0|6350=0|6351=0|6360=0.0528078713919967|6361=0.00698885442689061|10=158

OUT: 8=FIX.4.4|9=123|35=j|34=45|49=CLIENT1|52=20141114-19:12:07.220|56=EXECUTOR|45=34|58=Conditionally Required Field Missing(268)|372=X|380=5|10=139

The server shows:

IN: 8=FIX.4.4|9=123|35=j|34=46|49=CLIENT1|52=20141114-19:12:12.220|56=EXECUTOR|45=35|58=Conditionally Required Field Missing (268)|372=X|380=5|10=137

OUT: 8=FIX.4.4|9=193|35=X|34=36|49=EXECUTOR|52=20141114-19:12:17.221|56=CLIENT1|268=1|279=0|269=0|278=500257692|55=bond|5270=99.54393400065|6271=0|110=0|6350=0|6351=0|6360=0.0107738308608532|6361=0.047250702092424|10=154

I looked this up on http://www.fixtradingcommunity.org/FIXimate/FIXimate3.0/ and it is "Number of entries in Market Data message."

It looks like the server is sending Marketdata and not specifying the number of NoMDEntries? It is a bit strange, because for the Java version anyway, it appears this field gets set automatically, e.g., http://www.quickfixj.org/quickfixj/usermanual/1.5.3/usage/repeating_groups.html

This is the line that causes the problem in the client as it is getting MarketData from the server. I added the try catch block so I could see the exception myself, but it gives less information than if I let QF handle the exception and sending it back to the server through [OUT:]

void MyApplication::fromApp( const FIX::Message& message, const FIX::SessionID& sessionID )
throw( FIX::FieldNotFound, FIX::IncorrectDataFormat, FIX::IncorrectTagValue, FIX::UnsupportedMessageType )
{
    std::cout << std::endl << "IN: " << message << std::endl;
    try
    {
        crack( message, sessionID );
    }
    catch(std::exception& ex)
    {
        //I suppose I could comment out FIX::FieldNotFound above in the throw clause and ignore this exception 
       /// here since it seems that the thing is plain wrong since the field IS there!!??
        std::cout << "crack exception: " << ex.what() << "\n";
    }
}
Ivan
  • 7,448
  • 14
  • 69
  • 134
  • You mentioned that you're not sure how to paste the FIX messages in a more readable format; my suggestion is to use any decent text editor to replace the field delimiters (SOH characters) with '^' or '|'. – hunch_hunch Nov 14 '14 at 19:48
  • There is a nifty ed or sed command that does it, but I forget what it is. – Ivan Nov 14 '14 at 19:51
  • I added delimiters, hopefully preserving the actual fields in the message. – hunch_hunch Nov 14 '14 at 19:58
  • Is there a way to tell QF to use '^' or '|' instead of soh swhen outputting FIX messages to the log file? – Ivan Nov 14 '14 at 19:59
  • For logs? Not as far as I know. – hunch_hunch Nov 14 '14 at 20:01
  • This is all a bit strange, since AFAIK, all FIX engines add the NoMDEntries automatically? – Ivan Nov 14 '14 at 20:01
  • Check now I actually used the StackOverflow suggestion! – Ivan Nov 14 '14 at 20:10
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/64967/discussion-between-hunch-hunch-and-ivan). – hunch_hunch Nov 14 '14 at 20:14
  • Please show the line of code that is trying to read 268. I think I almost see what the problem is. – Grant Birchmeier Nov 14 '14 at 21:53
  • See above. I added to the main post. Hmmm, could it be the "throw( FIX::FieldNotFound...) ??? – Ivan Nov 14 '14 at 22:36
  • No, that's not what I'm looking for. `crack()` calls `OnMessage(MarketDataIncrementalRefresh)`, and somewhere in there you're doing `getField(268)` (or whatever the function is). I'm sure a stacktrace of the FieldNotFound exception will point to that line. I need to see that line and surrounding context. – Grant Birchmeier Nov 14 '14 at 22:54
  • Are you doing from http://www.quickfixengine.org/quickfix/doc/html/repeating_groups.html `FIX::NoMDEntries noMDEntries; message.get(noMDEntries);` ? I have come across doing `getField(268)` caused me a lot of grief. – DumbCoder Nov 17 '14 at 09:16

0 Answers0