public Task PublishAsync(SignalRMessage message)
        {
            var body      = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(message, _options.SerializerSettings));
            var sbMessage = new Message(body);

            return(_topicClient.SendAsync(sbMessage));
        }
        private async Task OnMessageReceived(SignalRMessage message, CancellationToken cancellationToken)
        {
            if (message.SenderId == _nodeIdProvider.NodeId)
            {
                // Ignore messages sent by self
                return;
            }

            var messageSender = _messageSenderProvider.GetMessageSenderForHub(message.HubTypeName);

            if (messageSender == null)
            {
                _logger.LogWarning("Can't find message sender for hub '{HubTypeName}'", message.HubTypeName);
                return;
            }

            foreach (var recipient in message.Recipients)
            {
                await recipient.SendCoreAsync(messageSender, message.Method, message.Args, cancellationToken);
            }
        }