Description
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).