Open StuartFerguson opened 4 months ago
Code is as follows for subscribing to a stream
await using var subscription = client.SubscribeToStream( "test-stream", "subscription-group", cancellationToken: ct); await foreach (var message in subscription.Messages) { switch (message) { case PersistentSubscriptionMessage.SubscriptionConfirmation(var subscriptionId): Console.WriteLine($"Subscription {subscriptionId} to stream started"); break; case PersistentSubscriptionMessage.Event(var resolvedEvent, _): await HandleEvent(resolvedEvent); await subscription.Ack(resolvedEvent); break; } }
More information here: Event Store Documentation
Code is as follows for subscribing to a stream
More information here: Event Store Documentation