I’d like to understand how stale messages are/can be treated. In case you’re not clear what I mean by stale messages here’s an example:
StatusChangedEvent: Draft–>Submitted : timestamp 1
StatusChangedEvent: Submitted–>Active : timestamp 2
StatusChangedEvent: Active–>Submitted : timestamp 3
The only message we care about is the last one as this is the current state. If the service was down for some reason and then brought back up, its possible that all three messages could be processed at the same time. However, only one will ever succeed at a time due to concurrency checking. However, if msg 3 succeeded first then 1, then 2 the final result will be ‘Active’ which isn’t correct.
So I’m interested in what the recommendation is for handling this scenario. I don’t think TTL is a good option here as we never want that last message to disappear before its had a chance to be processed.