update method

Future<void> update(
  1. String streamId,
  2. String groupName, {
  3. int bufferSize = 10,
  4. UserCredentials? userCredentials,
  5. PersistentSubscriptionSettings? settings,
  6. EventStoreClientOperationOptions? operationOptions,
})

Updates a filtered persistent subscription groupName on given stream.

Parameters streamId and groupName identifies the PersistentSubscription to subscribe to.

Callback SubscriptionResolvedEventCallback is invoked and awaited when a new event is received over the subscription.

Callback SubscriptionDroppedCallback is invoked and awaited when the subscription is dropped.

Returns as EventStreamSubscription on first response from the server.

Implementation

Future<void> update(
  String streamId,
  String groupName, {
  int bufferSize = 10,
  UserCredentials? userCredentials,
  PersistentSubscriptionSettings? settings,
  EventStoreClientOperationOptions? operationOptions,
}) async {
  return $runRequest<void>(() async {
    final client = await $getClient();
    final request = _setUpdateReq(
      UpdateReq(),
      streamId,
      groupName,
      settings ?? PersistentSubscriptionSettings.Default,
    );
    await client.update(
      request,
      options: $getOptions(
        userCredentials: userCredentials,
        operationOptions: operationOptions,
      ),
    );
  });
}