Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-750

Receiving Logout with too high or too low sequence causes messages to be lost

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Default
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.6.0
    • Component/s: Engine
    • Labels:
      None

      Description

      For Loogout messages the "Too High" check is not done on the sequence number. If a Logout message with a sequence number that is too high is received, the NextTargetMsgSeqNum is still incremented anyway. This causes a message to be lost.

      For example say the NextTargetMsgSeqNum=500 and a Logout message with MsgSeqNum=550 is received NextTargetMsgSeqNum gets incremented to 501. Then a Logon message is received with MsgSeqNum=551 a ResendRequest is sent for 501 to 550 and MsgSeqNum 500 is lost/never received.

      In the nextLogout(Message) method I think modifying the increment statement to guard against this should avoid this situation:

      int msgSeqNum = message.getInt(MsgSeqNum.FIELD);
      if (!isTargetTooHigh(msgSeqNum)) {
          state.incrNextTargetMsgSeqNum();
      }
      

        Attachments

          Activity

            People

            • Assignee:
              chrjohn Christoph John
              Reporter:
              niallp Niall
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: