EventStore-Client-NodeJS icon indicating copy to clipboard operation
EventStore-Client-NodeJS copied to clipboard

No obvious way to determine when an allStreamSubscription has caught up

Open leopoldodonnell opened this issue 4 years ago • 0 comments

This issue is likely the same for individual stream subscriptions, but it isn't clear how to determine when a subscriber is caught up.

One use case: Running a batch job to create a read model, or a new stream.

It is currently not clear how to tell when subscription is caught up and the batch process can end. We're using allStream subscriptions with filters because it is a large database and all we want are the relevant events.

Currently the API delivers: 'data', 'close', 'confirmation', 'end', 'error', 'readable'. Is the expectation that the 'readable' event get used for this?

leopoldodonnell avatar May 21 '21 18:05 leopoldodonnell