Skip to content

Commit 9f4cb7a

Browse files
committed
Avoid resubscribe from the event, which is the next to the failed one
1 parent 57633a7 commit 9f4cb7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Eventuous.Subscriptions/SubscriptionService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ protected async Task Handler(ReceivedEvent re, CancellationToken cancellationTok
7575
re.EventType
7676
);
7777

78-
_lastProcessed = GetPosition(re);
79-
8078
if (re.EventType.StartsWith("$")) {
79+
_lastProcessed = GetPosition(re);
8180
await Store().NoContext();
8281
return;
8382
}
@@ -88,6 +87,7 @@ await Task.WhenAll(
8887
_eventHandlers.Select(x => x.HandleEvent(re.Payload, (long?) re.StreamPosition, cancellationToken))
8988
).NoContext();
9089
}
90+
_lastProcessed = GetPosition(re);
9191
}
9292
catch (Exception e) {
9393
Log?.Log(

0 commit comments

Comments
 (0)