0

I'm very new in quickfix.

I created a client that connects normally with server. On my fromApp() function I can print the message with a simple std::cout << message << std::endl; and all fields of the message are there, also they are there on log files. When I try to call crack() it throws Field not found exception. Looking at log files I saw that the exception is thrown because quickfix can't find field 35. Anyone knows something about this?

EDIT1:

void fromApp( const FIX::Message& message,
                           const FIX::SessionID& sessionID )
throw( FIX::FieldNotFound, FIX::IncorrectDataFormat, FIX::IncorrectTagValue, FIX::UnsupportedMessageType )
{
    std::cout << "FromApp" << std::endl;
    std::cout << message << std::endl;

    try
    {
        crack( message, sessionID );
    }
    catch(std::exception& ex)
    {
        std::cout << "crack exception: " << ex.what() << std::endl;
    }
}

void onMessage( const FIX44::MarketDataIncrementalRefresh& message, const FIX::SessionID& sessionID )
{

    std::cout << "OnMessage" << std::endl;
}

On my terminal windows I get the following output:

FromApp
8=FIX.4.49=12335=W34=7249=servidor52=20150123-13:34:56.95756=cliente22=448=CERB001D55=CERB001D268=1269=0270=100271=1000290=110=239    
crack exception: Field not found

On the the message.current.log I get:

20150123-13:29:03.618 : 8=FIX.4.49=7035=A34=149=cliente52=20150123-13:29:03.61856=servidor98=0108=2010=077
20150123-13:29:03.655 : 8=FIX.4.49=7035=A34=149=servidor52=20150123-13:29:03.65856=cliente98=0108=2010=081
20150123-13:29:06.629 : 8=FIX.4.49=12235=W34=249=servidor52=20150123-13:29:06.63556=cliente22=448=CERB001D55=CERB001D268=1269=0270=100271=1000290=110=175

EDIT2:

When I put the crack() function outside the try-catch block, in message.event.log I get:

20150123-15:49:11.204 : Message 2 Rejected: Conditionally Required Field Missing:35
20150123-15:49:16.221 : Message 3 Rejected: Conditionally Required Field Missing:35

Thank you in advance.

  • Can you post a bit more of your code and error messages so the context is clearer? – qwerty_so Jan 23 '15 at 12:57
  • Can you show us the message that indicates that tag 35 is the problem? Your description and assumptions don't sound right to me. – Grant Birchmeier Jan 23 '15 at 15:02
  • If I put the crack() function outside the try-catch block in event.current.log I get: 20150123-15:49:11.204 : Message 2 Rejected: Conditionally Required Field Missing:35 20150123-15:49:16.221 : Message 3 Rejected: Conditionally Required Field Missing:35 – Rafael Nascimento Jan 23 '15 at 15:49

1 Answers1

1

I finally found the source of the problem.

I had installed quickfix from source code and it seems that in newer versions of quickfix (1.14.0 and latest) something changed in DataDictionaryProvadider.h related with shared pointers and it seems that it was the cause of the problem. When I installed quickfix from apt-get, I got version 1.13.3 and everything worked fine.

Thanks to everybody who tried to help.