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

But when handling garbled messages and processing the pending queue

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Incomplete
    • Affects Version/s: 1.5.0
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      prod

      Description

      For the below use case, QFJ is not working correctly.

      Client doesn't send HB messages to server and server always sends TestRequest.

      1) Client sends a garbled message. Example 34=35. QFJ just logs the message "invalid checksum or body length"
      2) Client sends next message with 34=36. QFJ sends ResendRequest to replay 35 (correct) and puts into the queue
      3) Client sends next message with 34=37. QFJ logs Resend already sent(correct) and puts into the queue
      4) Client is NOT sending any messages to server and due to no processed incoming messages, it fires TestRequest
      5) Client respond to TestReqeust with HB
      6) QFJ code hande the HB in the nextHeartbeat message, where it will verify for Seq too high and just return (correct)

      private void nextHeartBeat(Message heartBeat) throws FieldNotFound, RejectLogon,
      IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException,
      InvalidMessage {
      if (!verify(heartBeat))

      { return; }

      state.incrNextTargetMsgSeqNum();
      nextQueued();
      }

      7) But, the public void next(Message message) method after calling nextHeartBeat method, it just continue and process the nextQueued(); method as nextHeartBeat just returns and no further checks.

      Ideally nextHeartbeat should return a boolean flag and action accordingly.

      This happens due to combination of events.
      1) Client is not sending any incoming messages(not even HB)
      2) Client session gets into seq too high
      3) Then engine fire TestRequest and client responding with HB

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rohitqfj rohit qfj
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: