【问题标题】:Quickfix crack() throws Field not found exception for field 35Quickfix crack() 为字段 35 抛出 Field not found 异常
【发布时间】:2015-01-23 12:53:06
【问题描述】:

我是 quickfix 的新手。

我创建了一个与服务器正常连接的客户端。在我的 fromApp() 函数上,我可以使用简单的 std::cout

编辑1:

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;
}

在我的终端窗口上,我得到以下输出:

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

在我得到的 message.current.log 上:

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:

当我将crack() 函数放在try-catch 块之外时,在message.event.log 中我得到:

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

提前谢谢你。

【问题讨论】:

  • 您能否发布更多代码和错误消息以使上下文更清晰?
  • 你能告诉我们标签 35 是问题的消息吗?你的描述和假设对我来说听起来不正确。
  • 如果我将crack()函数放在event.current.log的try-catch块之外,我会得到:20150123-15:49:11.204:消息2被拒绝:有条件的必填字段缺失:35 20150123 -15:49:16.221:消息 3 被拒绝:有条件的必填字段缺失:35

标签: exception quickfix


【解决方案1】:

我终于找到了问题的根源。

我已经从源代码安装了 quickfix,似乎在新版本的 quickfix(1.14.0 和最新版本)中,DataDictionaryProvadider.h 中与共享指针相关的内容发生了变化,这似乎是问题的原因。当我从 apt-get 安装 quickfix 时,我得到了 1.13.3 版本,一切正常。

感谢所有试图提供帮助的人。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多