简体   繁体   English

QuickFIX/n 错误:标签出现不止一次(字段=523)

[英]QuickFIX/n error: Tag appears more than once (Field=523)

My QuickFIX/n 5.0SP2 application is rejecting the R message with error - Tag appears more than once (Field=523).我的 QuickFIX/n 5.0SP2 应用程序拒绝 R 错误消息 - 标签出现不止一次(字段 = 523)。 I have looked at all the similar issues on this site and the suggested solutions are not working for me.我查看了该站点上的所有类似问题,但建议的解决方案对我不起作用。 I have UseDataDictionary=Y in the settings.我在设置中有 UseDataDictionary=Y。 I have tried with Validate options set to Y and N. The message contains custom fields which I have added to the application data dictionary.我已尝试将验证选项设置为 Y 和 N。该消息包含我已添加到应用程序数据字典中的自定义字段。 I have checked the order of all the fields and it looks good.我检查了所有字段的顺序,看起来不错。 I tried using QuickFix.Net.NETCore.FIX50SP2 and QuickFIXn.FIX5.0SP2 nuget packages in case there was a difference in message parsing.我尝试使用 QuickFix.Net.NETCore.FIX50SP2 和 QuickFIXn.FIX5.0SP2 nuget 包,以防消息解析存在差异。

Some fields are not received in the correct order as per the standard FIX protocol.根据标准 FIX 协议,某些字段未按正确顺序接收。 I have updated the order of the data dictionary fields to match the order of fields in the message.我更新了数据字典字段的顺序以匹配消息中字段的顺序。 Could the order still be causing the message reject?订单是否仍会导致消息被拒绝?

To confirm that the correct data dictionary is being picked, I tried adding a new required field and my application rejected the message, as expected, saying the required tag was missing.为了确认选择了正确的数据字典,我尝试添加一个新的必填字段,但我的应用程序按预期拒绝了消息,说缺少必填标签。

I have been stuck on this error for a week now, any help would be highly appreciated!我已经被这个错误困了一个星期了,非常感谢任何帮助!

Rejected message: 20210924-05:09:21.123: 8=FIXT.1.1 9=123 35=R 34=234 52=20210924-05:09:21.721 49=XYZ 56=ABC 131=LST1 46=1 55=110K MAX 828=57 60=20210924-05:09:21 75=20210924 464=Y 20086=1 20073=REQ 20074=N 20075=N 20076=N 20077=[N/A] 20078=[N/A] 20079=5 20081=300 453=2 448=xyz 447=C 452=3 802=3 523=Shruti B 803=2 523=NY 803=25 523=US 803=4000 448=Customer 447=C 452=1 802=1 523=123 803=4002 5745=1 48=123ABC 22=1 460=10 167=MBS 762=MBSSPL 15=USD 64=20211015 541=20510920 223=2 38=1000000 54=1 699=1ABC2 761=1 423=12 228=1.0 58=Test DN 092401 10=209被拒绝的消息:20210924-05:09:21.123: 8=FIXT.1.1 9=123 35=R 34=234 52=20210924-05:09:21.721 49=XYZ 56=ABC 131=LST1 46=1 55=110K MAX 828=57 60=20210924-05:09:21 75=20210924 464=Y 20086=1 20073=REQ 20074=N 20075=N 20076=N 20077=[N/A] 20078=[N/A] 20079=5 20081=300 453=2 448=xyz 447=C 452=3 802=3 523=Shruti B 803=2 523=NY 803=25 523=US 803=4000 448=客户 447=C 452=1 802=1 523 =123 803=4002 5745=1 48=123ABC 22=1 460=10 167=MBS 762=MBSSPL 15=美元 64=20211015 541=20510920 223=2 38=1000000 54=1 699=1ABC2 761=12 423 228=1.0 58=测试 DN 092401 10=209

SessionSettings会话设置

# default settings for sessions-->
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=60
ResetOnLogon=N
ResetOnLogout=Y
LogonTimeout=60
UseLocalTime=Y
FileLogPath=/fix_logs

# session definition
[SESSION]
# inherit FileLogPath, ConnectionType,
#    ReconnectInterval from default
BeginString=FIXT.1.1
SenderCompID=XYZ
TargetCompID=ABC
StartDay=monday
EndDay=saturday
StartTime=00:30:00
EndTime=18:16:00
HeartBtInt=60
CheckLatency=N
MaxLatency=240
UseDataDictionary=Y
DefaultApplVerID=FIX.5.0SP2
SocketConnectPort=xxxxx
SocketConnectHost=xxx.xx.xx.xxx
FileStorePath=/file_store
TransportDataDictionary=FIXT11.xml
AppDataDictionary=FIX50SP2.xml
ValidateFieldsOutOfOrder=Y
ValidateFieldsHaveValues=Y
ValidateUserDefinedFields=Y

Partial Dictionary部分词典

<fix type="FIX" major="5" minor="0" servicepack="2">
    <header/>
    <messages>
        <message name="QuoteRequest" msgtype="R" msgcat="app">
            <field name="QuoteReqID" required="Y"/>
            <component name="QuotReqGrp" required="Y"/>
            <component name="Parties" required="Y"/>
            <field name="MultipleTickets" required="N"/>
            <field name="SecurityID" required="N"/>
            <field name="SecurityIDSource" required="N"/>
            <field name="Product" required="N"/>
            <field name="SecurityType" required="N"/>
            <field name="SecuritySubType" required="N"/>
            <field name="Currency" required="N"/>
            <field name="SettlDate" required="N"/>
            <field name="MaturityDate" required="N"/>
            <field name="CouponRate" required="N"/>
            <component name="OrderQtyData" required="N"/>
            <field name="Side" required="N"/>
            <component name="SpreadOrBenchmarkCurveData" required="N"/>
            <field name="PriceType" required="N"/>
            <field name="Factor" required="N"/>
            <field name="Text" required="N"/>
            <field name="EncodedTextLen" required="N"/>
            <field name="EncodedText" required="N"/>
            <field name="BookingType" required="N"/>
            <field name="OrderRestrictions" required="N"/>
        </message>
    </messages>
    <trailer/>
    <components>
        <component name="QuotReqGrp">
                <field name="NoRelatedSym" required="Y"/>
                <field name="Symbol" required="Y"/>
                <field name="SymbolSfx" required="N"/>
                <field name="TrdType" required="N"/>
                <field name="TransactTime" required="Y"/>
                <field name="TradeDate" required="Y"/>
                <field name="TestMessageIndicator" required="N"/>
                <field name="NoOfDealers" required="N"/>
                <field name="NegotiationType" required="N"/>
                <field name="CanRespond" required="N"/>
                <field name="CanQuote" required="N"/>
                    <field name="CanRequote" required="N"/>
                    <field name="BookName" required="N"/>
                    <field name="TraderList" required="N"/>
                    <field name="TimeoutPeriod" required="N"/>
                    <field name="NewTimePeriod" required="N"/>
                    <field name="QuoteTimePeriod" required="N"/>
                    <field name="ConfirmTimePeriod" required="N"/>
                    <field name="RequoteTimePeriod" required="N"/>
                <!--<field name="Price" required="Y"/>-->
        </component>
        <component name="Parties">
            <group name="NoPartyIDs" required="Y">
                <!--<field name="NoPartyIDs" required="Y"/>-->
                <field name="PartyID" required="Y"/>
                <field name="PartyIDSource" required="N"/>
                <field name="PartyRole" required="N"/>
                <component name="PtysSubGrp" required="Y"/>
            </group>
        </component>
        <component name="PtysSubGrp">
            <group name="NoPartySubIDs" required="Y">
                <field name="PartySubID" required="Y"/>
                <field name="PartySubIDType" required="Y"/>
            </group>
        </component>
        <component name="OrderQtyData">
            <field name="OrderQty" required="N"/>
            <field name="CashOrderQty" required="N"/>
            <field name="OrderPercent" required="N"/>
            <field name="RoundingDirection" required="N"/>
            <field name="RoundingModulus" required="N"/>
        </component>
        <component name="SpreadOrBenchmarkCurveData">
            <field name="Spread" required="N"/>
            <field name="BenchmarkCurveCurrency" required="N"/>
            <field name="BenchmarkCurveName" required="N"/>
            <field name="BenchmarkCurvePoint" required="N"/>
            <field name="BenchmarkPrice" required="N"/>
            <field name="BenchmarkPriceType" required="N"/>
            <field name="BenchmarkSecurityID" required="N"/>
            <field name="BenchmarkSecurityIDSource" required="N"/>
        </component>
    </components>
    <fields>
    </fields>
</fix>

The issue was the presence of custom fields in the incoming message that were missing in my data dictionary.问题是传入消息中存在我的数据字典中缺少的自定义字段。 At some point, while attempting to add these custom fields and cleaning up the dictionary, I removed the Parties component from the QuotReqGrp component and placed it after QuotReqGrp.在某些时候,在尝试添加这些自定义字段和清理字典时,我从 QuotReqGrp 组件中删除了 Parties 组件并将其放在 QuotReqGrp 之后。 I started again with a fresh copy of the data dictionary and added the custom fields to resolve the issue.我重新开始使用数据字典的新副本并添加自定义字段来解决问题。

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

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