|
From: Christoph J. <chr...@ma...> - 2019-08-21 12:21:02
|
QFJ orders the tags based on the order in the default data dictionary. If you want to change this order you need to re-generate the message classes. https://www.quickfixj.org/usermanual/2.1.0/usage/codegen.html The easiest is probably when you change the default FIX4.4 dictionary that is packaged with QFJ and rebuild. However, the actual problem might be that you are not adding the repating groups correctly to the message. NoMDEntryTypes is a repeating group and needs to be added differently than the flat tags. https://www.quickfixj.org/usermanual/2.1.0/usage/repeating_groups.html Cheers, Chris. On 21.08.19 13:34, Pavel Tashev wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > > > Hi, > > I construct a message in the following way: > > > quickfix.fix44.MarketDataRequestmessage=newquickfix.fix44.MarketDataRequest(); > charzero='0'; > charone='1'; > message.setField(newquickfix.field.MDReqID("EURUSD")); // 262 > message.setField(newquickfix.field.SubscriptionRequestType(one)); // 263 > message.setField(newquickfix.field.MarketDepth(1)); // 264 > message.setField(newquickfix.field.MDUpdateType(0)); // 265 > message.setField(newquickfix.field.NoMDEntryTypes(2)); // 267 > message.setField(newquickfix.field.MDEntryType(zero)); // 269 > message.setField(newquickfix.field.MDEntryType(one)); // 269 > message.setField(newquickfix.field.NoRelatedSym(1)); // 146 > message.setField(newquickfix.field.SecurityID("4001")); // 48 > message.setField(newquickfix.field.SecurityIDSource("8")); // 22 > Session.sendToTarget(message, senderCompID, marketTargetCompID); > > I also load a dictionary in which tags 146, 48 and 22 are after tag 269. But the message sent to > the trader looks like this: > > 8=FIX.4.4^A9=121^A35=V^A34=2^A49=USERNAME^A52=20190821-11:11:42.045^A56=TRADER^A22=8^A48=4001^A146=1^A262=EURUSD^A263=1^A264=1^A265=0^A267=2^A269=1^A10=191^A > > The confusing thing is that tags 146, 48 and 22 are mixed and moved before tag 262 even though the > dictionary doesn't allow that. > > I have two suggestion why this may happen: > > * Quickfix/J mixes the tags because of an issue or because I miss some configuration. > * The dictionary provided by the trader is not loaded and I use some defaultdictionary which > brings me to this issue. > > I don't know if that would help but here is the cfg file: > > [DEFAULT] > ConnectionType=initiator > BeginString=FIX.4.4 > StartTime=08:30:00 > EndTime=21:30:00 > ReconnectInterval=5 > HeartBtInt=5 > LogonTimeout=60 > FileStorePath=target/data/sessions/ > FileLogPath=target/data/logs/ > SenderCompID=USERNAME > UseDataDictionary=Y > SocketUseSSL=Y > [SESSION] > TargetCompID=TRADER > SocketConnectHost=URL_OF_THE_TRADER > SocketConnectPort=443 > DataDictionary=/var/quickfixj/automated/DICTIONARY.xml > > Regards, > Pavel > > > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users -- Christoph John Software Engineering T +49 241 557080-28 chr...@ma... MACD GmbH Oppenhoffallee 103 52066 Aachen, Germany www.macd.com Amtsgericht Aachen: HRB 8151 Ust.-Id: DE 813021663 Geschäftsführer: George Macdonald |