quickfixj icon indicating copy to clipboard operation
quickfixj copied to clipboard

`ForceResendWhenCorruptedStore` causes session-level messages to be resent

Open chrjohn opened this issue 2 years ago • 0 comments

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.

https://github.com/quickfix-j/quickfixj/blob/a48c11b57898d95cbfa9d32ba1be3bdee5f895fd/quickfixj-core/src/main/java/quickfix/Session.java#L2367-L2386

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.

chrjohn avatar Jan 06 '23 10:01 chrjohn