-
Notifications
You must be signed in to change notification settings - Fork 117
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 and pass all events from event store to node-cqrs-eventdenormalizer #104
Comments
It depends on your system but basically you need to wrap for example es.getEvents() with a rest service or a dedicated channel on the messageBus. |
Thanks. The rebuild-readmodel method would be accessible via a Rest request to the Host Server and would send a messages to the EventStore to get the events before requesting the Eventdenormalizer to perform a replay. |
There is no correct or incorrect... just do what best fits in your system. |
Thank you for the explanation. |
Hello,
Thank you for your library.
The issue concerns how node-eventstore transmits events to node-cqrs-eventdenormalizer.
I want to rebuild a viewmodel by extracting all the events from the store.
For eventdenormalizer I can do:
eventdenormalizer.clear(function(err) {}); eventdenormalizer.replay([/* ordered array of events */], function (err) { if (err) { console.log(err); } });
For node-eventstore I can use to fetch all the events:
es.getEvents()
However, I didn't find the solution to pass my events from the event store to my eventdenormalizer.
Do I need to use eventstore.setEventToDispatched() for each event or is there another way?
Thanks.
Josh
The text was updated successfully, but these errors were encountered: