diff --git a/src/sw/redis++/async_redis.h b/src/sw/redis++/async_redis.h index 1e662e14..cdeb1fcd 100644 --- a/src/sw/redis++/async_redis.h +++ b/src/sw/redis++/async_redis.h @@ -991,6 +991,11 @@ class AsyncRedis { return _command(fmt::publish, channel, message); } + template + void publish(const StringView &channel, const StringView &message, Callback &&cb) { + _callback_fmt_command(std::forward(cb), fmt::publish, channel, message); + } + // co_command* are used internally. DO NOT use them. template diff --git a/src/sw/redis++/async_redis_cluster.h b/src/sw/redis++/async_redis_cluster.h index 8df2df8d..8eb0f36a 100644 --- a/src/sw/redis++/async_redis_cluster.h +++ b/src/sw/redis++/async_redis_cluster.h @@ -991,6 +991,11 @@ class AsyncRedisCluster { return _command(fmt::publish, channel, message); } + template + void publish(const StringView &channel, const StringView &message, Callback &&cb) { + _callback_fmt_command(std::forward(cb), fmt::publish, channel, message); + } + // co_command* are used internally. DO NOT use them. template