liquidprojections / LiquidProjections

Liquid Projections supports building and maintaining autonomous .NET projection code in an Event Sourcing architecture.
https://www.liquidprojections.net
MIT License
169 stars 25 forks source link

Detect and recover projectors that are ahead of the event store. #96

Closed dennisdoomen closed 7 years ago

dennisdoomen commented 7 years ago

Adds a new options object that allows a subscriber to tell the dispatcher to restart the subscription at the first transaction available in the underlying event source, and allow the subscriber to clean-up just before that.

dennisdoomen commented 7 years ago

Adding another delegate would mean the subscription delegate will start to look like this;

    public delegate IDisposable CreateSubscription(long? lastProcessedCheckpoint,
        Func<IReadOnlyList<Transaction>, SubscriptionInfo, Task> handler, Func<Task> noSuchCheckpoint,
        string subscriptionId);

Feels a bit awkward. What do you think?

dennisdoomen commented 7 years ago

@IharBury please review again. I've applied your proposal.