EventStore / EventStore-Client-Dotnet

Dotnet Client SDK for the Event Store gRPC Client API written in C#
Other
140 stars 38 forks source link

Iterator based subscription API (DEV-112) #252

Closed hunter1703 closed 4 months ago

hunter1703 commented 1 year ago

Added : Subscription API similar to read API i.e. iteration based rather than callback based Added : With new API, user code can now receive control messages like Checkpoint, CaughtUp (this new control message will be part of a separate PR and is the actual goal of DB-224) etc. from the subscription in addition to events

Example :

var subscription = client.SubscribeToAll(FromAll.Start);

await foreach (var message in subscription.Messages) {
    if (message is StreamMessage.Event eventMessage) {
        await eventAppeared(eventMessage.ResolvedEvent);
    } else if (message is StreamMessage.SubscriptionMessage.Checkpoint checkpointMessage) {
        await checkpointReached(checkpointMessage.Position);
    }
}

subscriptionDropped();
linear[bot] commented 1 year ago

DB-224 Support notifying catchup subscriptions that they are live

linear[bot] commented 1 year ago
DEV-106 Support notifying catchup subscriptions that they are live

Client side part of [DB-224](https://linear.app/eventstore/issue/DB-224/support-notifying-catchup-subscriptions-that-they-are-live)

linear[bot] commented 12 months ago

DB-224 Support notifying catchup subscriptions that they are live

DEV-112 Subscription is live message support in .NET client

RagingKore commented 4 months ago

Added to latest version.