publish method

Future<int> publish(
  1. String channel,
  2. Object message
)

publish

Implementation

Future<int> publish(String channel, Object message) async {
  Object result = await _runWithRetryNew(() async {
    return (await RespCommandsTier1(_client!).publish(channel, message));
  });

  if (result is RespType2<dynamic>) {
    return result.toInteger().payload;
  }

  return (result as RespType3<dynamic>).toInteger().payload;
}