标签多次出现 QuickFix
我正在向客户端应用程序发送消息 MarketDataSnapshotFullRefresh,但在 toAdmin 方法中收到“标签出现多次”。我收到的原始消息字符串是
8=FIX.4.2|9=111|35=3|34=222|49=CLIENT1|52=20120217-18:57:44.233|56
=FixServer|45=189|58=Tag appears more than once|371=37|372=W|10=234|
有人有想法吗?
QuickFix42.MarketDataSnapshotFullRefresh message =
new QuickFix42.MarketDataSnapshotFullRefresh(new Symbol("QF"));
QuickFix42.MarketDataSnapshotFullRefresh.NoMDEntries group =
new QuickFix42.MarketDataSnapshotFullRefresh.NoMDEntries();
group.set(new MDEntryType('0'));
group.set(new MDEntryPx(12.32));
group.set(new MDEntrySize(100));
group.set(new OrderID("ORDERID"));
message.addGroup(group);
group.set(new MDEntryType('1'));
group.set(new MDEntryPx(12.32));
group.set(new MDEntrySize(100));
group.set(new OrderID("ORDERID"));
message.addGroup(group);
Session.sendToTarget(message, session);
I am sending a message MarketDataSnapshotFullRefresh to a client application, but I am getting "Tag appears more than once" in the toAdmin method. The raw message string I am getting is
8=FIX.4.2|9=111|35=3|34=222|49=CLIENT1|52=20120217-18:57:44.233|56
=FixServer|45=189|58=Tag appears more than once|371=37|372=W|10=234|
Does anybody have an idea?
QuickFix42.MarketDataSnapshotFullRefresh message =
new QuickFix42.MarketDataSnapshotFullRefresh(new Symbol("QF"));
QuickFix42.MarketDataSnapshotFullRefresh.NoMDEntries group =
new QuickFix42.MarketDataSnapshotFullRefresh.NoMDEntries();
group.set(new MDEntryType('0'));
group.set(new MDEntryPx(12.32));
group.set(new MDEntrySize(100));
group.set(new OrderID("ORDERID"));
message.addGroup(group);
group.set(new MDEntryType('1'));
group.set(new MDEntryPx(12.32));
group.set(new MDEntrySize(100));
group.set(new OrderID("ORDERID"));
message.addGroup(group);
Session.sendToTarget(message, session);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的问题在于您的数据字典 - 您的 FIX42.xml 文件应该具有 MarketDataSnapshotFullRefresh 的正确定义,并为 MDEntries 重复组定义组件块。还要确保您的配置文件具有“UseDataDictionary=Y”并且您的路径定义了自定义 FIX42.xml。
您的 .xml 文件中定义的字段顺序也可能与对方的规范不同。确保它们的顺序也相同。
Your problem lies in your data dictionary - your FIX42.xml file should have the correct definition for MarketDataSnapshotFullRefresh, with the component block defined for the MDEntries repeating group.Also make sure your config file has "UseDataDictionary=Y" and that the path to your custom FIX42.xml is defined.
It is also possible that the order of the fields defined in your .xml file is not the same as your counterparty's spec. Make sure they are in the same order as well.
这看起来像是一个重复的小组问题。您的客户端将快照消息视为平面无组消息,然后由于重复的标签而拒绝它。 (您的消息构造代码看起来是正确的。)
当客户端无法识别组时,通常意味着 DataDictionary 配置错误。
确保在您的配置中设置以下内容,我怀疑这个特定问题将会消失:
This looks like a repeating group issue. Your client is treating Snapshot message as a flat no-groups message, and then rejecting it because of the repeated tags. (Your message construction code appears correct.)
When a client does not recognize groups, then that usually means the DataDictionary is misconfigured.
Make sure the following is set in your configuration, and I suspect that this particular problem will go away: