Skip to content

Discarding PossDup messages with too low seqnum #1254

Description

@morvael

Describe the bug
I have an issue with resent messages being dropped by session due to "too low" sequence numbers. I know I can use the global flag to turn off validation of sequence numbers, but not sure if this is safe.

Expected behavior
Messages recieved with PossDupFlag=Y not discarded.

system information:

  • OS: Linux
  • Java version: JDK21
  • QFJ Version: 3.0.1

Additional context

            if(!state.isResetReceived()){
                if (checkTooHigh && isTargetTooHigh(msgSeqNum)) {
                    doTargetTooHigh(msg);
                    return false;
                } else if (checkTooLow && isTargetTooLow(msgSeqNum)) {
                    doTargetTooLow(msg);
                    return false;
                }
            }

Seing how doTargetTooLow returns boolean from validatePossDup if it is one, I believe the code above should be changed to:

            if(!state.isResetReceived()){
                if (checkTooHigh && isTargetTooHigh(msgSeqNum)) {
                    doTargetTooHigh(msg);
                    return false;
                } else if (checkTooLow && isTargetTooLow(msgSeqNum)) {
                    return doTargetTooLow(msg);
                }
            }

alternatively

            if(!state.isResetReceived()){
                if (checkTooHigh && isTargetTooHigh(msgSeqNum)) {
                    doTargetTooHigh(msg);
                    return false;
                } else if (checkTooLow && isTargetTooLow(msgSeqNum) && doTargetTooLow(msg) == false) {
                    return false;
                }
            }

I know it would help in my case, not sure if this is generally a good fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions