[QFJ-770] Message fromString don't report about REPEATING_GROUP_FIELDS_OUT_OF_ORDER Created: 23/Jan/14  Updated: 27/Jul/17  Resolved: 13/Apr/17

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.5.3
Fix Version/s: 1.6.4

Type: Improvement Priority: Minor
Reporter: Andrey Alekov Assignee: Christoph John
Resolution: Fixed Votes: 0
Labels: Message
Environment:

Windows 7.
Version: 6.1
Build: 7606 SP1

Eclipse.
Version: Juno Service Release 2
Build id: 20130225-0426


Issue Links:
Relates
is related to QFJ-792 Wrong order of fields in a repeating ... Closed

 Description   

When I tried to parse message from String I faced with not expected behavior of method Message.fromString()

Source message in Repeating group have unordered tags and values. Example are below.
SOH replaced to pipe (|)
String test = new String("8=FIX.4.4|9=16858|35=d|49=1|34=2|52=20140117-18:20:26.629|56=3|57=21|322=388721|323=4|320=1|393=42|82=1|67=1|711=1|311=780508|309=text|305=8|463=FXXXXX|307=text|542=20140716|436=10.0|9013=1.0|9014=1.0|9017=10|9022=1|9024=1.0|9025=Y|916=20140701|917=20150731|9201=23974|9200=17|9202=text|9300=727|9301=text|9302=text|9303=text|998=text|9100=text|9101=text|9085=text|9083=0|9084=0|9061=579|9062=text|9063=text|9032=10.0|9002=F|9004=780415|9005=780503|10=128|");

When call fromString I see parsed message without any error.
8=FIX.4.4|9=100|35=d|34=2|49=1|52=20140117-18:20:26.629|56=3|57=21|67=1|82=1|320=1|322=388721|323=4|393=42|711=42|10=156|

I checked Message.Exception and found next "Out of order repeating group members, field=916"

Well, I found what in Message.parse method (line Message.java:485) written exception but not raised.

} catch (final FieldException e)

{ exception = e; }

Please fix to raise InvalidMessage instead filling this.exception to case below.



 Comments   
Comment by Christoph John [ 13/Apr/17 ]

It is "normal" that the Message object tries to parse the FIX string with minimal validation. Validation is done later using dataDictionary.validate().
However, I will change the code to add the repeating group regardless of parsing errors (see QFJ-792). That way it is possible to at least have the repeating group set on the message (possibly with missing fields). You could then set some flags to have the message parsed anyway:

dictionary.setCheckUnorderedGroupFields(false);
dictionary.setCheckUserDefinedFields(false);
dictionary.setAllowUnknownMessageFields(true);

But please note that this has its limitations. If there are unknown group count fields for instance, then QFJ will never be able to parse the message since it does not know where a repeating group starts or ends.

Generated at Sun Apr 28 23:57:48 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.