This repository has been archived by the owner on Mar 20, 2023. It is now read-only.
[EventsSubscription] Deduplication for consumers #371
Labels
priority: high
People can work around the issue but it’s painful
scope: 🛰 api
Requires changes in the api workspace
type: ✨ feat
Another new, shiny thing we can have in our app
In any OOP language, you can use a decorator pattern or inheritance e.q.
I use JS hack because it's simpler and faster to code.
I see some pros and cons of using the current implementation of transactional consistency:
is no long-living active transaction)
executeAfterTransaction
fails, external resources)I agree with you that we should abandon transactional consistency. In the end, it's harder to ensures and code.
As I understand, we have 3 cases when
onEvent
is invoked:I think that we can mitigate duplicates 'globally' in the 1st and 3rd cases:
version
field to each read-model. Theversion
points toeventId
orglobalOrder
and representsthe current state of read-model up to this event.
causation_id
) to filter out duplicates.Originally posted by @HTK4 in #364 (comment)
The text was updated successfully, but these errors were encountered: