[QFJ-403] Rejecting due to OrigSendingTime not being in Tag without Data Dictionary Created: 10/Feb/09  Updated: 05/Oct/14  Resolved: 20/Mar/11

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: 1
Labels: None

Issue Links:
Duplicate
duplicates QFJ-654 Rejecting due to OrigSendingTime not ... Closed
Relates
relates to QFJ-703 Do not reject PossDup message which d... Resolved

 Description   

Hi,

I'm using quickfix/J and for some reason I keep rejecting messages with reject:

20090210-16:13:01: Message 641 Rejected: Required tag missing:122

I have the following configuration options set in configuration:

UseDataDictionary=N
ValidateFieldsOutOfOrder=N
ValidateFieldsHaveValues=N
VaidateUserDefinedFields=N
CheckLatency=N

And I have also attempted to rip out OrigSendingTime from my Data Dictionary as a precautionary measure. I don't ever explicitly call this tag in code. Any help on this issue would be appreciated.

Regards,
Herman



 Comments   
Comment by Herman Hung [ 10/Feb/09 ]

At this point, I've also literally emptied my Application (quickfixj.Application). It should not be doing ANYTHING, and yet I'm still rejecting on that tag. Anyone, please help?

Regards,
Herman

Comment by Toli Kuznets [ 10/Feb/09 ]

Herman,

Can you include the logs that show the flow of messages going out and coming in preceding this error?

From the FIX spec about tag 122:

Required for message resent as a result of a Resend Request (2) . If data is not available set to same value as SendingTime (52) (Can be embedded within encrypted data section.)

It's possible that your counterparty is not sending you the message with that tag, and QFJ may be rejecting it b/c it is required in a particular case. It's impossible to say what's going on without seeing the actual message flow.

Make sure you enable logging for INFO level. Here's a sample for Log4J:

# QuickFIX/J.
log4j.logger.quickfixj.msg.incoming=INFO
log4j.logger.quickfixj.msg.outgoing=INFO
log4j.logger.quickfixj.event=INFO
Comment by Herman Hung [ 10/Feb/09 ]

Hi Toli,

Thanks for the response. I cannot attach logs at this time, but I can confirm that the scenario that you are putting forth is happening: someone is sending me FIX messages in response to a resend request and not including that tag. However, it appears that the code that processes the association of tag 122 with this event is buried inside the QuickFix/J code and is something that I would like to override. Is there anything I can do to override this check?

Regards,
Herman

Comment by Herman Hung [ 10/Feb/09 ]

(That is, anything short of editing the QuickFix/j source itself?)

Comment by Andy Malakov [ 21/Dec/10 ]

It seems that the following code fragment from Session.java is responsible for reject:

private boolean validatePossDup(Message msg) throws FieldNotFound, IOException {
final Message.Header header = msg.getHeader();
final String msgType = header.getString(MsgType.FIELD);
final Date sendingTime = header.getUtcTimeStamp(SendingTime.FIELD);

if (!msgType.equals(MsgType.SEQUENCE_RESET)) {
if (!header.isSetField(OrigSendingTime.FIELD))

{ generateReject(msg, SessionRejectReason.REQUIRED_TAG_MISSING, OrigSendingTime.FIELD); return false; }

....

It appears that some FIX implementations (e.g. ICE exchange) do not set OrigSendingTime in some of their messages during resend.

Comment by Andy Malakov [ 22/Dec/10 ]

I propose to validate OrigSendingTime field only if it is present in inbound message:

 Index: java/quickfix/Session.java
===================================================================
         Date sendingTime = header.getUtcTimeStamp(SendingTime.FIELD);
 
         if (!msgType.equals(MsgType.SEQUENCE_RESET)) {
-            if (!header.isSetField(OrigSendingTime.FIELD)) {
-                generateReject(msg, SessionRejectReason.REQUIRED_TAG_MISSING, OrigSendingTime.FIELD);
-                return false;
+        	Date origSendingTime;
+        	try {
+            	  origSendingTime = header.getUtcTimeStamp(OrigSendingTime.FIELD);
+             } catch (FieldNotFound e) {
+            	 origSendingTime = null;
               }
-
-            Date origSendingTime = header.getUtcTimeStamp(OrigSendingTime.FIELD);
-            if (origSendingTime.compareTo(sendingTime) > 0) {
+            if (origSendingTime != null && origSendingTime.compareTo(sendingTime) > 0) {
                 generateReject(msg, SessionRejectReason.SENDINGTIME_ACCURACY_PROBLEM, 0);
                 generateLogout();
                 return false;
             }
+
         }
 
         return true
Comment by MANOJ M [ 03/Oct/14 ]

Could you please let me know the resoltion for this issue? I am having same issue while connecting to ICE.

Comment by Christoph John [ 05/Oct/14 ]

See QFJ-703.

Generated at Sat Nov 23 10:41:05 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.