我正在尝试捕获SecurityList
条消息(35 = y)
在日志文件中接收消息为:
8=FIXT.1.19=000036635=y49=XXXXXX56=XXXXXX34=352=20190204-10:41:59.758369=2320=1322=R1560=0393=951301=DGCX_PRECIOUS_METALS1300=GOLD_FUTURES893=N146=255=[N/A]48=546822=8167=FUT200=201906541=20190529231=32107=DG-20190529562=1561=115=USD120=USD7555=26555=[N/A]48=546922=8167=FUT200=201904541=20190327231=32107=DG-20190327562=1561=115=USD120=USD7555=26510=180
8=FIXT.1.19=9735=j34=349=XXXXXX52=20190204-10:42:00.29356=XXXXXX45=258=Unsupported Message Type372=y380=310=178
第一件事-无法在fromApp()方法中捕获此消息。
第二步-使用message cracker,
破解它,但不采用这种方法:
public void onMessage(SecurityList message, SessionID sessionId)
throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue {
log.info("Recieved SecurityList");
}
XML文件看起来像这样具有相同的消息顺序:
<message name='SecurityList' msgtype='y' msgcat='app'>
<component name='ApplicationSequenceControl' required='N' />
<field name='SecurityReportID' required='N' />
<field name='ClearingBusinessDate' required='N' />
<field name='SecurityReqID' required='N' />
<field name='SecurityResponseID' required='N' />
<field name='SecurityRequestResult' required='N' />
<field name='TotNoRelatedSym' required='N' />
<field name='MarketID' required='N' />
<field name='MarketSegmentID' required='N' />
<field name='LastFragment' required='N' />
<component name='SecListGrp' required='N' />
<field name='SecurityListID' required='N' />
<field name='SecurityListRefID' required='N' />
<field name='SecurityListDesc' required='N' />
<field name='EncodedSecurityListDescLen' required='N' />
<field name='EncodedSecurityListDesc' required='N' />
<field name='SecurityListType' required='N' />
<field name='SecurityListTypeSource' required='N' />
<field name='TransactTime' required='N' />
</message>
Conf文件:
UseDataDictionary=Y
AppDataDictionary=C:\conf\FIX50SP2.xml
这可能是什么原因。
答案 0 :(得分:1)
使用let fileUrl = URL(string: destinationString)!
破解了一条消息,需要检查Message Cracker
类是否正在破解该特定消息。
较旧的版本可能会漏掉一些消息。
使用MessageCracker
类正在破解此消息的较新版本quickfix-messages-fix50sp2-2.0.0
jar可以解决此问题。