简体   繁体   English

存在“ onMessage”破解时,抛出“ QuickFix.UnsupportedMessageType”异常

[英]“QuickFix.UnsupportedMessageType” exception was thrown, when the “onMessage” crack was present

I'm not quite sure why it happened. 我不太确定为什么会这样。 I request Market Data Request (with 263=1) and the counterparty gave response with (absolutely) MarketDataSnapshotFullRefresh (35=W). 我请求“市场数据请求”(263 = 1),并且交易对手以(绝对)MarketDataSnapshotFullRefresh(35 = W)给出了响应。 I've included the onMessage(QuickFix.FIX42.MarketDataSnapshotFullRefresh ...) on my message's cracker.. But the app has thrown the exception "QuickFix.UnsupportedMessageType"... 我在消息的破解程序中包含了onMessage(QuickFix.FIX42.MarketDataSnapshotFullRefresh ...)。但是该应用引发了异常“ QuickFix.UnsupportedMessageType” ...

So, I tried to capture the SnapshotMarketData directly from "FromApp" (without Message Cracker) and it successfully done. 因此,我尝试直接从“ FromApp”(没有Message Cracker)捕获SnapshotMarketData,并成功完成了任务。 So what's the matter with my message's cracker? 那么我的消息的饼干怎么了? Any idea? 任何想法?

This is the "FromApp" currently.. 这是当前的“ FromApp”。

public void FromApp(QuickFix.Message msg, SessionID sessionID) //every inbound Application-level message
    {
        if (msg.Header.GetField(Tags.MsgType) == MsgType.MARKET_DATA_SNAPSHOT_FULL_REFRESH)
            Homepage._homepage.GetFixMessage(msg.ToString());
        else
            Crack(msg, sessionID);
    }

And this is the Message Cracker previously (before I capture directly from "FromApp" 这是以前的Message Cracker(在我直接从“ FromApp”捕获之前

#region MessageCracker handlers
    public void onMessage(QuickFix.FIX42.MarketDataSnapshotFullRefresh mdsnapshot, SessionID s)
    {
        Homepage._homepage.GetFixMessage(mdsnapshot.ToString());
    }
    #endregion

OnMessage needs to start with a capital "O". OnMessage必须以大写的“ O”开头。

QF/n uses the C# convention of capitalizing method names. QF / n使用大写方法名称的C#约定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM