-
-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Being able to specify where an event subscription starts
Way more power around setting subscription starts Logic for determining the starting position of subscriptions Refactoring on AsyncOptions before additional position rules Put the starting position logic for subscriptions in AsyncOptions
- Loading branch information
1 parent
aeb0e90
commit 24e710a
Showing
15 changed files
with
510 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Event Subscriptions <Badge type="tip" text="7.7" /> | ||
|
||
Hey folks, there will be much more on this topic soon. Right now, it's in Marten > 7.6, but part of the core Marten team is | ||
working with a client to prove out this feature. When that's done, we'll fill in the docs and sample code. | ||
|
||
<!-- snippet: sample_ISubscription --> | ||
<a id='snippet-sample_isubscription'></a> | ||
```cs | ||
/// <summary> | ||
/// Basic abstraction for custom subscriptions to Marten events through the async daemon. Use this in | ||
/// order to do custom processing against an ordered stream of the events | ||
/// </summary> | ||
public interface ISubscription : IAsyncDisposable | ||
{ | ||
/// <summary> | ||
/// Processes a page of events at a time | ||
/// </summary> | ||
/// <param name="page"></param> | ||
/// <param name="controller">Use to log dead letter events that are skipped or to stop the subscription from processing based on an exception</param> | ||
/// <param name="operations">Access to Marten queries and writes that will be committed with the progress update for this subscription</param> | ||
/// <param name="cancellationToken"></param> | ||
/// <returns></returns> | ||
Task<IChangeListener> ProcessEventsAsync(EventRange page, ISubscriptionController controller, | ||
IDocumentOperations operations, | ||
CancellationToken cancellationToken); | ||
} | ||
``` | ||
<sup><a href='https://github.com/JasperFx/marten/blob/master/src/Marten/Subscriptions/ISubscription.cs#L9-L30' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_isubscription' title='Start of snippet'>anchor</a></sup> | ||
<!-- endSnippet --> | ||
|
||
## Registering Subscriptions | ||
|
||
## Event Filtering | ||
|
||
## Rewinding or Replaying Subscriptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.