[QFJ-535] ValidateFieldsOutOfOrder=N not applied on all message levels Created: 28/Jun/10 Updated: 20/May/11 Resolved: 20/May/11 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Engine |
Affects Version/s: | 1.4.0 |
Fix Version/s: | 1.5.1 |
Type: | Bug | Priority: | Major |
Reporter: | SSE | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 2 |
Labels: | None | ||
Environment: |
All |
Issue Links: |
|
Description |
QuickFIX configuration flag ValidateFieldsOutOfOrder=N has been applied. Although QuickFIX/J should ignore field ordering on all repeating group levels (as specified by ValidateFieldsOutOfOrder=N), some session rejects from the engine have been observed by the clients and in internal test, which reject FIX messages because of improper field ordering (example: reversed order of PartyIDSource (447) and PartyRole (452) in the Parties group). After reviewing the QuickFIX/J source code, it has been established that the cause of the problem is that the flag is not propagated properly to second and higher groups levels in the recursive validation of the FIX message. Fixed: propagate the flag properly. public void setCheckFieldsHaveValues(boolean flag) { } (Internal reference: IC_58606) |
Comments |
Comment by Steve Bate [ 22/Apr/11 ] |
This is a misunderstanding of the documented purpose of the ValidateFieldsOutOfOrder flag: "If set to N, fields that are out of order (i.e. body fields in the header, or header fields in the body) will not be rejected.". It is not related at all to group field ordering or and field ordering other than specific header fields. This option was inherited from the QuickFIX C++ implementation. |
Comment by Steve Bate [ 22/Apr/11 ] |
To be more precise, it allows headers fields in the body and vice versa. So it's not actually related to specific header fields, but any header/body incorrect orderings. Again, it was not intended to inhibit validation of group field ordering. |
Comment by Grant Birchmeier [ 24/Apr/11 ] |
Steve, I agree with your assessment. Is there a reason you didn't close this bug? |
Comment by Steve Bate [ 25/Apr/11 ] |
Eric checked in some changes related to this issue (SVN Rev #1019). I was wondering if he had a different interpretation of the issue. |
Comment by Eric Deshayes [ 26/Apr/11 ] |
Steve, we fixed the issue in our integration branch by keeping the actually implemented semantic: we check the fields orders as it is done in quickfix.Message.parseGroup(String, StringField, DataDictionary, FieldMap). We could add the semantic you are referring to (out of order meaning body fields in the header, or header fields in the body) if needed. If we want to have both this semantic and the current one, we would have to add a new boolean setting. |
Comment by Grant Birchmeier [ 26/Apr/11 ] |
Is such a feature really needed? I've had counterparties in the past who've put fields out of order, but the resulting order was always deterministic. Simply rearranging the DataDictionary was all that was needed. |
Comment by Christoph John [ 05/May/11 ] |
Hi guys, I'm a little confused. Could anyone please tell me what is wrong with ValidateFieldsOutOfOrder? Is the documentation wrong or the code? There are some tickets dealing with this, e.g. Our situation: We have a customer which suddenly reported that his messages get rejected after we have switched from QuickFIX/J 1.3.1 to 1.5.0. Looking at the messages we could see that he sent tag 50 (SenderSubID) incorrectly at the end of the message. On the old and the new version we have set ValidateFieldsOutOfOrder=N. Looking at the documentation (and also stated by Steve in the second comment: "To be more precise, it allows headers fields in the body and vice versa. So it's not actually related to specific header fields, but any header/body incorrect orderings.") I would suppose that the message could be parsed correctly with either version. But with 1.5.0 this fails. Here is a short test which fails with 1.5.0 regardless if I set dataDictionary.setCheckFieldsOutOfOrder to true or false. {{ @Test final DataDictionary dataDictionary = new DataDictionary( "etc/FIX.4.2.xml" ); // behaviour for QuickFIX 1.3.1: true -> parsing of nos2 fails String correctFixMessage = "8=FIX.4.2|9=218|35=D|49=cust|50=trader|56=FixGateway|34=449|52=20110420-09:17:40|11=clordid|54=1|38=50|59=6|40=2|44=77.1|" String incorrectFixMessage = "8=FIX.4.2|9=218|35=D|49=cust|56=FixGateway|34=449|52=20110420-09:17:40|11=clordid|54=1|38=50|59=6|40=2|44=77.1|" Any help is greatly appreciated. Thanks |
Comment by Jörg Thönnes [ 10/May/11 ] |
In reply to comment #5: Salut Eric, could you re-add this semantic for the QF/J 1.5.1 release as you offered above? Merci, Jörg |
Comment by Eric Deshayes [ 12/May/11 ] |
Hi Jörg, |
Comment by Eric Deshayes [ 12/May/11 ] |
committed on the integration branch in rev#1032 added new session property to ignore misordered group fields: ValidateUnorderedGroupFields. for the initial ValidateFieldsOutOfOrder property, the expected behaviour has been implemented. |