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

Cancellation token in exception handlers #102

Closed IharBury closed 7 years ago

IharBury commented 7 years ago

We would like to use delays in our exception handlers. However currently there is no easy way to abort those delays when the subscription is terminated. Adding a CancellationToken to the delegate would fix this issue.

IharBury commented 7 years ago

The same issue exists for the ShouldRetry delegate in the projector.

dennisdoomen commented 7 years ago

Good point. Would be a breaking chance unfortunately.

IharBury commented 7 years ago

Would be a breaking chance unfortunately.

We could just add new delegates and keep the old ones.

IharBury commented 7 years ago

Discussed with @dennisdoomen. We will extend SubscriptionInfo with the cancellation token. That will fix the issue with HandleException delegate. We will the issue in projector specific delegates later (or maybe we will not fix it at all there) because the Dispatcher level exception handling should be enough for most use cases.

dennisdoomen commented 7 years ago

So this is now resolved?

IharBury commented 7 years ago

Unless we want to provide the cancellation token for projector specific error handlers, we can close all the three issues.

dennisdoomen commented 7 years ago

Don't see any priority in this now.