Exemplo n.º 1
0
        /// <inheritdoc />
        public override Task SendGroupAsync(string groupName, string methodName, object?[] args, CancellationToken cancellationToken = default)
        {
            if (groupName == null)
            {
                throw new ArgumentNullException(nameof(groupName));
            }

            var message = _protocol.WriteInvocation(methodName, args);

            return(PublishAsync(_channels.Group(groupName), message));
        }
        public override Task SendGroupAsync(string groupName, string methodName, object[] args, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (groupName == null)
            {
                throw new ArgumentNullException(nameof(groupName));
            }

            var channel = _channels.Group(groupName);
            var message = _protocol.WriteInvocation(methodName, args);
            var server  = _options.ServerResovler.Resolve(_shardingServers, channel);

            return(PublishAsync(server, channel, message));
        }