'Processing messages with PossDupFlag set with QuickFixJ
In QuickFix/J we can send a ResendRequest
message to the Acceptor to request messages to be resent to the Initiator, within a given MsgSeq
number range. For example:
Session session = Session.lookupSession(new SessionID("FIXT.1.1:SENDER->TARGET"));
session.send(new ResendRequest(new BeginSeqNo(1), new EndSeqNo(0)));
This message will request all existing Execution Reports for any open orders in the Acceptor.
The issue we have is that these messages come with PossDupFlag
set to Y
in the header. QuickFix/J by default ignores these messages and doesn't call the fromApp
callback. I found that the callback is called if we set
ValidateSequenceNumbers=Y
but, as per the documentation, it has a drawback
If not enabled and a mismatch is detected, nothing is done.
I was wondering:
- is there a different way for these messages to be processed by the callback?
- if there is no other way what are the consequences of setting
ValidateSequenceNumbers=Y
? Is it just detect the sequence number mismatch ourselves?
Thanks
Solution 1:[1]
After some digging around I found a solution for this problem. Basically, we need to tell QuickFix/J that our target MsgSeqNum
is 1. The logic will detect that the actual target's MsgSeqNum
is higher than the one we have set and it will send a ResendRequest
to the Acceptor:
Session session = Session.lookupSession(new SessionID("FIXT.1.1:SENDER->TARGET"));
session.setNextTargetMsgSeqNum(1);
In this case, the fromApp
callback is called even though the PosDupFlag
is set in the messages.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Eduardo Sanchez-Ros |