[QFJ-371] fromApp method causes message reject with "Conditionally required field missing" Created: 13/Nov/08 Updated: 15/Nov/12 Resolved: 13/Nov/08 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Other | Priority: | Default |
Reporter: | Herman Hung | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Environment: |
FIX 4.2 |
Description |
Hi, I have a fromapp method defined as follows in QuickFix/J: // Method to determine messages that we receive from the FIX Exchange (Non-administrator class messages) When I receive a specific message, though, I send out a reject with text "Conditionally Required Field Missing": 8=FIX.4.2 9=81 35=AQ 49=FLOB 56=6000 34=54 52=20081113-13:39:41.629 57=1 568=1 569=0 749=0 750=0 10=053 8=FIX.4.2 9=115 35=j 34=54 49=6000 50=1 52=20081113-13:39:40.420 56=FLOB 45=54 58=Conditionally Required Field Missing 372=AQ 380=5 10=213 I have also tried: // Method to determine messages that we receive from the FIX Exchange (Non-administrator class messages) And I send out the same reject. When I leave the fromApp method blank, then I don't reject the messages (indicating that my data dictionary settings are fine). Also, I've checked in my Data Dictionary, and I have set all fields that I'm getting in the message (except for the header and trailer) to "N". Any help would be appreciated. Thanks and regards, |
Comments |
Comment by Laurent Danesi [ 13/Nov/08 ] |
Hi Herman, If I well understand, you want to reject a specific message with the raeson: "Conditionally Required Field Missing". If it is, in fact, the simplest way is to throw an exception in the fromApp callback like: // Method to determine messages that we receive from the FIX Exchange (Non-administrator class messages) Laurent |
Comment by Laurent Danesi [ 13/Nov/08 ] |
Sorry but FieldNotFound need the field id but you can use another exception and put your reason like new MissingField("my reason"); Laurent |
Comment by Herman Hung [ 13/Nov/08 ] |
Hi...actually, I figured out the issue. I was trying to grab the MsgType from the message itself, not the message header, hence why I was rejecting the message. This issue can now be closed. |
Comment by Toli Kuznets [ 13/Nov/08 ] |
Herman, The MsgType (tag 35) field lives in the header and not the body of the FIX message. that'll solve your problem. the reason you are seeing the error is that when you do msg.getField(MsgType.FIELD), it throws a FieldNotFoundException which in turn comes back as a "Conditionally Required Field Missing" b/c the assumption in QFJ is that you are accessing a field that should be there. hope this helps |