Skip to content
This repository was archived by the owner on Aug 13, 2023. It is now read-only.
This repository was archived by the owner on Aug 13, 2023. It is now read-only.

Message IDs #3

@DarthGandalf

Description

@DarthGandalf

The way with milliseconds (as now) is not correct, because several messages might come within the same millisecond.

Let's assign some ID to every message. They need to be increasing to make implementation of clients easier, so GUID doesn't work for that.

My proposal is to use a pair (timestamp, number). Every second (or millisecond) the counter is reset, and for every message the counter is increased. That way every message will have its own ID, and client can request messages from that ID, without hoping that no other messages happened in the same millisecond.
The counter may be one for the whole network, or one per channel/query, that's an implementation detail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions