{{Quickfixn}} Question: Creating/populating a FIX message from a string - tag order problem

Philip Clem pclem at 4thstory.com
Tue Feb 9 08:51:12 PST 2016


Using the "message.FromString()" API, and entering a message string with
tags in the proper order, I end up with a message that has tags in numerical
order.

 

String messageText =
"262=1263=1264=1265=1266=Y267=4269=0269=1269=2269=B146=155=TUR.2032.D0387546
0=6167=CORP";

 

QuickFix.Message message = new QuickFix.FIX44.MarketDataRequest();

                QuickFix.IMessageFactory messageFactory = new
QuickFix.DefaultMessageFactory();

                QuickFix.DataDictionary.DataDictionary dataDict = new
QuickFix.DataDictionary.DataDictionary(@"M:\X4S_4.6\Config\FIXN\FIX44_ECV.xm
l");

                message.FromString(sb.ToString(), false, dataDict, dataDict,
messageFactory);

 

Resulting message string:

9=12055=TUR.2032.D03875146=1167=CORP262=1263=1264=1265=1266=Y267=4269=0460=6
10=012

 

That, of course, means the message is incorrectly formed for a message like
a MarketDataRequest that has grouped sections like: 146=1 55=
TUR.2032.D03875.

Also I get the same incorrect numerical tag order if I use the API:

                

message.SetField(new QuickFix.Fields.StringField(pair.Tag, tagValue));

 

Is there a way to prevent message tags from going into the message in
numerical order?

 

Philip H. Clem

pclem at 4thstory.com

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20160209/b9a55560/attachment.htm>


More information about the Quickfixn mailing list