spublish method

  1. @override
Future<int> spublish(
  1. String channel,
  2. String message
)
override

Posts a message to the given channel using Sharded Pub/Sub. Returns the number of clients that received the message. Note: In Cluster mode, this command is routed to the specific node that owns the slot for channel.

Implementation

@override
Future<int> spublish(String channel, String message) async {
  final response = await execute(['SPUBLISH', channel, message]);
  return response as int;
}