简体   繁体   English

验证前两个字段交换顺序的 QuickFix/N 重复组

[英]Validating QuickFix/N Repeating Group Where First Two Fields Swap Order

I am implementing a client to connect to a server which as far as I can tell uses a hybrid of FIX4.2 and FIX4.4.我正在实现一个连接到服务器的客户端,据我所知,它使用 FIX4.2 和 FIX4.4 的混合体。

The server sends group 453 (NoPartyIDs) with fields in a non-standard order when some events occur.当某些事件发生时,服务器会以非标准顺序发送带有字段的组 453 (NoPartyIDs)。

According to the specification document, the first field should be PartyID (448).根据规范文档,第一个字段应该是 PartyID (448)。 With certain messages, the first field in the group is PartyIDSource (447) and the message is rejected.对于某些消息,组中的第一个字段是 PartyIDSource (447),消息被拒绝。 PartyIDSource is the second field in the group as per the specification.根据规范,PartyIDSource 是组中的第二个字段。

I get the following error:我收到以下错误:

<event> Message 140 Rejected: Group 453's first entry does not start with delimiter 448 (Field=453)

From the documentation and trial and error, I cannot find a way through this issue.从文档和反复试验中,我找不到解决这个问题的方法。 Amongst a few guesses, I have tried adding field 447 as the first (non-required) field in the group definition in the data-dictionary.在一些猜测中,我尝试将字段 447 添加为数据字典中组定义中的第一个(非必需)字段。 I have also set ValidateFieldsOutOfOrder to N in the config.我还在配置中将 ValidateFieldsOutOfOrder 设置为 N。

Is there something I can do to not reject and process the message?我可以做些什么来不拒绝和处理消息吗?

Relevant documentation:相关文件:

Groups are a little more nuanced than other parts of the Data Dictionary.组比数据字典的其他部分更细微。

A group is defined within a message, with the group tag.组是在消息中定义的,带有组标记。 The first child element of the group tag is the group-counter tag, followed by the other fields in the group in the order in which they should appear in the message. group 标记的第一个子元素是 group-counter 标记,后面是组中的其他字段,按照它们在消息中出现的顺序排列。

ValidateFieldsOutOfOrder is not relevant here, so you can take that out. ValidateFieldsOutOfOrder与此处无关,因此您可以将其删除。

If I understand you correctly, you're saying that如果我没理解错的话,你是说

  • sometimes 447 comes before 448有时 447 出现在 448 之前
  • but at other times 448 comes before 447在其他时候448 在 447 之前

If this is true, then unfortunately your counterparty is being really stupid.如果这是真的,那么不幸的是你的交易对手真的很愚蠢。 Per the FIX spec, the order of fields in repeating groups is supposed to be in a consistent order.根据 FIX 规范,重复组中字段的顺序应该是一致的。 (And also, the first field of the each group-sequence is always required to be present.) If they're flip-flopping fields, they're violating FIX. (而且,每个组序列的第一个字段始终需要存在。)如果它们是翻转字段,则它们违反了 FIX。

If the order was consistent, you would just edit your DD to change the order, and it sounds like you tried that.如果顺序一致,您只需编辑您的 DD 来更改顺序,听起来您已经尝试过了。 But if your counterparty is flip-flopping, then your DD will always be wrong part of the time.但如果你的交易对手反复无常,那么你的 DD 总会有一部分时间是错误的。

I don't have a good answer for you.我没有好的答案给你。 QF/n is not designed to handle all the ways that counterparties do FIX wrong (nor should it be). QF/n 并非旨在处理交易对手执行 FIX 错误的所有方式(也不应该)。

Your counterparty's implementation is sloppy.您的交易对手的实施草率。 Try contacting their support and seeing if they'll fix it?尝试联系他们的支持,看看他们是否会修复它?

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

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