Describe the bug
When option ForceResendWhenCorruptedStore is enabled and there is a ResendRequest received it will cause session-level messages to be resent (because they are basically treated like application messages and toApp() is even called when resending them). This is not per the FIX spec which states that Reject messages are the only session-level messages which must be resent.
|
if (MessageUtils.isAdminMessage(msgType) && !forceResendWhenCorruptedStore) { |
|
if (begin == 0) { |
|
begin = msgSeqNum; |
|
} |
|
} else { |
|
initializeResendFields(msg); |
|
if (resendApproved(msg)) { |
|
if (begin != 0) { |
|
generateSequenceReset(receivedMessage, begin, msgSeqNum); |
|
} |
|
getLog().onEvent("Resending message: " + msgSeqNum); |
|
send(msg.toString()); |
|
begin = 0; |
|
appMessageJustSent = true; |
|
} else { |
|
if (begin == 0) { |
|
begin = msgSeqNum; |
|
} |
|
} |
|
} |
To Reproduce
Unit test to be created.
- Enable option
ForceResendWhenCorruptedStore.
- Put some session-level messages to the store (e.g.
Logon or Logout or Heartbeats).
- Connect to the session with a higher seqnum than expected. QFJ will then resend these session-level messages when it actually must not.
Expected behavior
There should be either a SequenceReset which skips the sequence numbers or SequenceReset GapFill messages instead of the problematic messages.
Describe the bug
When option
ForceResendWhenCorruptedStoreis enabled and there is aResendRequestreceived it will cause session-level messages to be resent (because they are basically treated like application messages andtoApp()is even called when resending them). This is not per the FIX spec which states thatRejectmessages are the only session-level messages which must be resent.quickfixj/quickfixj-core/src/main/java/quickfix/Session.java
Lines 2367 to 2386 in a48c11b
To Reproduce
Unit test to be created.
ForceResendWhenCorruptedStore.LogonorLogoutorHeartbeats).Expected behavior
There should be either a SequenceReset which skips the sequence numbers or SequenceReset GapFill messages instead of the problematic messages.