Skip to content

Problem of sending outgoingStore data even though CONNACK sessionPresent is false #1651

Open
@ogis-yamazaki

Description

@ogis-yamazaki

If SessionState is not present, the broker returns false to sessionPresent in CONNACK.

In this case, I don't think the client should send an in-flight message (PUBLISH, PUBREL)
Since the session is gone, retransmissions of messages that occurred in the old session should not be sent.

I think we need to distinguish between the following two. I think it is the first one that should be deleted.

  1. a PUBLISH message generated in a previous session.
  2. a PUBLISH message created before the current session was created (between CONNECT and the return of CONNACK).

It would be nice to have a clear function in the Store.

(remarks)
The MQTT V5.0 specification has the following description.
OASIS : Session Expiry Interval https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901048

Non-normative comment

The Client can avoid implementing its own Session expiry and instead rely on the Session Present flag returned from the Server to determine if the Session had expired. If the Client does implement its own Session expiry, it needs to store the time at which the Session State will be deleted as part of its Session State.

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