updateToAll method

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

Updates a filtered persistent subscription to SystemStreams.AllStream.

Parameters groupName identifies which 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> updateToAll(
  String groupName, {
  int bufferSize = 10,
  UserCredentials? userCredentials,
  PersistentSubscriptionSettings? settings,
  EventStoreClientOperationOptions? operationOptions,
}) async {
  return $runRequest<void>(() async {
    final client = await $getClient();
    final request = _setUpdateReq(
      UpdateReq(),
      SystemStreams.AllStream,
      groupName,
      settings ?? PersistentSubscriptionSettings.Default,
    );
    await client.update(
      request,
      options: $getOptions(
        userCredentials: userCredentials,
        operationOptions: operationOptions,
      ),
    );
  });
}