Skip to content

Before processing a message in a subscription, the following check must be performed: #3587

@marcschier

Description

@marcschier

Before processing a message in a subscription, the following check must be performed:

(!State.SequentialPublishing || ValidSequentialPublishMessage(ii.Value))

and ValidSequentialPublishMessage:

{
    // If sequential publishing is enabled, only release messages in perfect sequence.
    return message.SequenceNumber <= m_lastSequenceNumberProcessed + 1 ||
        // reconnect / transfer subscription case
        m_resyncLastSequenceNumberProcessed ||
        // release the first message after wrapping around.
        (message.SequenceNumber == 1 && m_lastSequenceNumberProcessed == uint.MaxValue);
}

Here, a message with an outdated SequenceNumber can be accepted.
I tried to simply change it to: (message.SequenceNumber = m_lastSequenceNumberProcessed + 1),
It caused side effects and I abandoned the idea of ​​fixing it right now.

Originally posted by @AnatolyKochnev in #3565 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions