1

I am using FIXT1.1 and FIX Application version 5.0SP2.

I added some custom fields to the QuotSetAckGrp, part of MassQuoteAcknowledgement message. However, when quickfix reads the repeating group, it does not read the custom fields as part of the repeating groups. Instead, it treats the custom fields are regular parent-level fields and throws a "Tag appears more than once" session level reject.

Appreciate any inputs to help resolve the issue.

Ashish Bhatia
  • 11
  • 1
  • 3
  • When you say you added custom fields, do you mean to say you added them in FIX50SP2.xml and referred to them in your config file by the AppDataDictionary element? – TT. Jun 29 '15 at 18:05
  • @TT. is on the right track. It sounds exactly like what would happen if you didn't modify your AppDataDictionary file. The receiver doesn't see these fields in the repeating group definition inside the DD, so it assumes they are not in the repeating group. – Grant Birchmeier Jun 29 '15 at 18:20
  • I did add the custom tags to my application specific FIX50SP2.xml and confirmed that my data dictionary was being referenced by creating some error conditions. – Ashish Bhatia Jun 29 '15 at 19:34
  • Are you using `UseDataDictionary=Y` in your config? I added that note to my answer below. It's a common mistake to forget that. – Grant Birchmeier Jun 29 '15 at 20:23
  • It would help to edit your question with the FIX message that is being rejected, along with your re-definition of the QuotSetAckGrp group and custom fields. – TT. Jun 29 '15 at 22:36
  • Are the fields in your DD's repeating group in the same order as the fields in your message's groups? The order is important in FIX. – Grant Birchmeier Jun 30 '15 at 15:47

2 Answers2

1

You need to modify the receiver's AppDataDictionary to match the messages that your sender is sending. Also, you need to set UseDataDictionary=Y in your config.

QF/j needs to look at the DD xml file to know what fields are in a repeating group, else it cannot know where each group member ends.

When the engine encounters a field that isn't inside the DD's repeating group definition, it assumes that the current group member ended with the previous tag.

Here's a howto for customizing your DD: http://quickfixn.org/tutorial/custom-fields-groups-and-messages

(The above link is for QF/n, but it's nearly the same for QF/j.)

Grant Birchmeier
  • 17,809
  • 11
  • 63
  • 98
  • Yes, I did add UseDataDictionary=Y. Perhaps I can upload my DD and the message that's giving an issue. May be I am missing something else. – Ashish Bhatia Jun 29 '15 at 21:05
1

See the QuickFIX/J User FAQ, topic "I altered my data dictionary. Should I regenerate/rebuild QF/J?".

OUTGOING MSGS: The DD xml file is irrelevant when you construct outgoing messages. You can pretty much add whatever fields you want to messages using the generic field setters (setString, setInt, etc) and QF will let you. The only trouble is with repeating groups. QF will write repeating group element ordering according to the DD that was used for code generation. If you altered any groups that are part of outgoing messages, you DEFINITELY need to rebuild.

To rebuild QuickFIX/J to accept your custom data dictionary, please refer to the answer I gave in the following StackOverflow post.

HTH.

TT.
  • 15,774
  • 6
  • 47
  • 88
  • @GrantBirchmeier Now that you mention it :) it never occurred to me. – TT. Jun 30 '15 at 15:54
  • For an outbound message - you are correct. In my case, it's an inbound message that's causing the issue. The message is: 8=FIXT.1.1^A9=205^A35=b^A34=10^A49=counterParty^A52=20150629-17:47:09.416^A56=my_fix_id^A117=1020053-3-1-17-18^A296=2^A302=2I65BZBO920200320^A20129=2^A21002=INVALIDID^A302=2I65BZBO920200320^A20129=2^A21002=INVALIDID^A297=5^A10=249^A The QuotSetAckGrp component is modified in the data dictionary to include tags 20129 and 21002 as elements, and these are defined in the section of the data dictionary. – Ashish Bhatia Jul 01 '15 at 12:42
  • @AshishBhatia From the User FAQ: _If you changed field orders inside of repeating groups, then I recommend that you do (rebuild QuickFIX/J), especially if those group changes are in outgoing messages._. So even for incoming messages it is probably recommended to rebuild QuickFIX/J if you have custom fields in repeating groups. – TT. Jul 01 '15 at 12:52