subscribe abstract method

Subscription subscribe(
  1. List<String> channels
)

Subscribes the client to the specified channels.

Returns a Subscription object containing:

  1. messages: A Stream<ValkeyMessage> to listen for incoming messages.
  2. ready: A Future<void> that completes when the server confirms subscription to all requested channels.

You MUST await subscription.ready before assuming the subscription is active.

Throws a ValkeyClientException if mixing channel and pattern subscriptions.

Implementation

Subscription subscribe(List<String> channels);