Event Store Blog

22.0.0 gRPC Dotnet Client Release Notes

Written by João Bragança | Apr 4, 2022 9:30:46 AM

We are pleased to announce the release of v22.0.0 of the Dotnet gRPC Client!

You can get the packages from nuget here:
dotnet add package EventStore.Client.Grpc.Streams --version 22.0.0

New features

We've added several new features in this release, to keep in line with the other gRPC clients. 

Persistent Subscriptions

You can now create a Persistent Subscription to $all. Additionally, you can apply a filter just as you can for subscriptions. There is more information on the documentation site.

Streams

We've introduced a new way to enumerate through a stream read:

var result = client.ReadStream(Direction.Forwards, "a-stream", StreamPosition.Start);

await foreach (var message in result.Messages) {
  switch (message) {
   ...
  }
} 

Also, we've increased the default deadline for reads to Infinity. If you want your reads to timeout, set the optional deadline parameter.

Breaking changes

There are several breaking changes in this release, which we have outlined here. If you have any questions, feel free to ask them on our discuss forum

Subscriptions

We've changed the Subscription API surface to reduce confusion about what the position means. For example, ReadStreamAsync with StreamPosition.Start will give you events 0,1,2, but SubscribeToStreamAsync from StreamPosition.Start will skip event 0 and give you 1,2. In addition, there were overloads for the Subscribe* methods to use when you had no checkpoint at all.

To resolve this, we came up with new types to use with the Subscriptions API and eliminated the overloads: FromAll and FromStream. Now you can use FromAll.Start/FromStream.Start when you have no checkpoint, and FromAll.After/FromStream.After when you do have a checkpoint.

Dotnet Framework 4.8

After being introduced in 21.2, support for Dotnet 4.8 has been dropped. This is due to several bugs in the gRPC Core implementation including one that can deadlock your application under certain conditions. 

Other

  • The optional configureOperationOptions parameter has been removed from most methods. Instead, an explicit deadline parameter has been added to these methods.
  • SoftDeleteAsync has been renamed to DeleteAsync.
  • autoAck has been removed for Persistent Subscriptions. You must now ack the message manually.

Documentation

Documentation for EventStoreDB can be found here.

If you have any questions that aren't covered in these release notes or the docs, please feel free to reach out on discuss, Github, or Slack.

Providing Feedback

If you encounter any issues, please don’t hesitate to open an issue on GitHub if there isn’t one already.

Additionally, there is a fairly active discuss channel, and an #eventstore channel on the DDD-CQRS-ES Slack community.