7

A Quickfix client validates incoming messages using XML spec files. If a message fails validation, quickfix automatically sends a rejection response. AFAIK in this case quickfix does not call the standard callback for incoming messages fromApp(), so up till now I was unable to programatically capture these erroneous incoming messages and handle them.

Is there a way to capture incoming FIX messages which fail quickfix validation?

Of course they may appear in the default quickfix log files, but I would rather capture them in my code in realtime.

cengizkrbck
  • 704
  • 6
  • 21
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359

2 Answers2

5

There is not.

QuickFIX simply does not consider this a useful feature. If a message is invalid, QF performs the protocol-specified behavior and there is nothing that the application could or should do to recover. Any fix will require developer analysis and xml and/or code fixes, thus log files are sufficient to record the issue.

If you would like an automated alert when such errors occur, I suggest perhaps some kind of external log monitoring app that could watch your logs for occurrences of 35=3 or 35=j. (On the cheap side, a composition of cron/grep actions could do this very easily.)

Grant Birchmeier
  • 17,809
  • 11
  • 63
  • 98
  • I consider it a QuickFix design flaw, thanks for the workaround suggestion – Jonathan Livni Apr 30 '14 at 11:43
  • 1
    A flaw would imply some improper FIX behavior. At best, you could say this is a missing feature, but it's not one that people are clamoring for. In my 5 years on the FIX mailing list, I don't think I've ever heard anyone ask for this. – Grant Birchmeier Apr 30 '14 at 14:02
  • 1
    It's been a problem... it would be good to have a message in the log to say "this has failed XML validation". – rupweb Apr 02 '15 at 11:46
1

Validation via XML spec file is in session level processing. So, there is not suitable hook for this.

On the other hand, there are some configuration parameters;

  • UseDataDictionary : eliminates validation
  • ValidateUserDefinedFields : eliminates user defined field's validation

look for detailed descriptions

edit: If your real problem is monitoring rejections, capturing Reject(3) and BusinessReject(j) messages at toAdmin() hook is sufficient.

cengizkrbck
  • 704
  • 6
  • 21