Reputation: 1827
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:
ValidateSequenceNumbers=Y
? Is it just detect the sequence number mismatch ourselves?Thanks
Upvotes: 0
Views: 553
Reputation: 1827
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.
Upvotes: 1