Exemple #1
0
        public Task Publish(string channel, string message) =>
        ExecuteWithSession(async session =>
        {
            var result = await _subscriptionClient.Publish(session, channel, message).ConfigureAwait(false);

            if (result.IsFailure)
            {
                throw new RedisException(
                    $"Error while publishing message to the channel '{channel}' [REDIS CODE: {result.Error}]",
                    result.Exception);
            }
        });