[QFJ-691] But when handling garbled messages and processing the pending queue Created: 12/Jul/12  Updated: 19/Dec/13  Resolved: 19/Dec/13

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.5.0
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: rohit qfj Assignee: Unassigned
Resolution: Incomplete Votes: 0
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



 Comments   
Comment by rohit qfj [ 12/Jul/12 ]

This bug is present in the latest 1.5.2 and all other previous branches

Comment by Christoph John [ 10/Oct/12 ]

Sorry, could you please be more specific on what you expect? What should happen after the verify method returns and why?

Thanks

Generated at Mon May 06 07:13:28 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.