Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get all events since event with id? #103

Open
IRT-fbachmann opened this issue Feb 2, 2017 · 2 comments
Open

Get all events since event with id? #103

IRT-fbachmann opened this issue Feb 2, 2017 · 2 comments

Comments

@IRT-fbachmann
Copy link

I'm wondering how replay is done best. My intuition was to take "THE_LAST_EVENT_SEEN"-id from the revisionGuard of my event-denormalizer and read all events from the event store that come after that one.

However, I still didn't find this feature and wonder how this should be done instead... What is the desired way to do this (or am I completely wrong with this thinking)?

@adrai
Copy link
Contributor

adrai commented Feb 2, 2017

In the projects I've seen so far... for the replay use case (new read model) we/they do replay each event from the beginning.... => getEvents https://github.com/adrai/node-eventstore#query-your-events
and for occasionally missing events => getEventsByRevision
and only for edge cases when denormalizers where down for a longer time... they do get the "THE_LAST_EVENT_SEEN" containing an occurredAt field and use getEventsSince

@IRT-fbachmann
Copy link
Author

Thanks for the fast reply... the last point is how I do it currently. However, I quite often had events that occurred at the same time (yes, exactly same time down to milliseconds). Guess I just augment my function so it ignores everything that comes before the last seen event ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants