+
Skip to content

Mercure never catches you up when you ask for a last-event-id that it hasn't seen #704

Open
@spantaleev

Description

@spantaleev

I have a system developed using an old alternative to Mercure, which I'd like to migrate to Mercure.

Clients ask for a version of a resource by sending ?lastEventID=...

These versions are simple timestamps (e.g. 1665666647) stored on the resource (e.g. Ticket.lastActivityTime = 1665666647).

The problem is, Mercure does not necessarily get an update about each and every update. It only sees events about the important changes to this lastActivityTime field.

Because of this, sometimes clients will ask for a lastEventID which Mercure has never seen. Even though newer updates are published to Mercure, the client that asked for ?lastEventID=OLD_AND_UNSEEN will never get updated. It will be stuck forever.


I was hitting the same issue with clients asking for lastEventID=0 (when they haven't seen any updates) yet. I've worked around this by sending lastEventID=earliest as the spec says.

However, I still have some instances in which clients ask for a missing event ID. These clients neither get an error, nor a response telling them they're in the wrong, nor do they magically get caught up somehow (I realize that there's no good way to magically catch them up).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpinnedThe issue must not be marked as stale

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载