EventStore / EventStore-Client-Dotnet

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

Align catch-up and persistent subscription Subscribe #119

Open alexeyzimarev opened 3 years ago

alexeyzimarev commented 3 years ago

Catch-up subscriptions have the ability to tweak the client operation options:

public Task<StreamSubscription> SubscribeToStreamAsync(
...
      Action<EventStoreClientOperationOptions>? configureOperationOptions = null,
...
    {
      EventStoreClientOperationOptions operationOptions = this.Settings.OperationOptions.Clone();
      if (configureOperationOptions != null)
        configureOperationOptions(operationOptions);
      return this.SubscribeToStreamAsync(streamName, eventAppeared, operationOptions, resolveLinkTos, subscriptionDropped, userCredentials, cancellationToken);
    }

However, for persistent subscriptions, there is no such possibility, it just clones the client settings, as in the snippet above, but doesn't provide any options to tweak the settings.

Is it by design, why can one tweak client operation options for catch-up subscriptions, but not for persistent subscriptions?