My QuickFIX/n 5.0SP2 application is rejecting the R message with error - Tag appears more than once (Field=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. 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. 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.
Some fields are not received in the correct order as per the standard FIX protocol. 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
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. I started again with a fresh copy of the data dictionary and added the custom fields to resolve the issue.