Closed josh0707 closed 7 years ago
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. Then when you want to rebuild you can ask that service to return your events by streaming or I would recommend to implement some sort of pagination...
Hello,
Thank you for your library.
I want to rebuild a viewmodel.
I can do it by using:
eventdenormalizer.clear(function (err) {});
eventdenormalizer.replay([/* ordered array of events */], function (err) { if (err) { console.log(err); } });
I can query my events from node-eventstore using:
es.getEvents()
However, I didn't find the solution to pass my events from the event store to my eventdenormalizer. Since eventdenormalizer subscribes to eventstore events, do I need to dispatch each event using
eventstore.setEventToDispatched
or is there another way?Thanks.
Josh