@@ -190,7 +190,19 @@ public override Task InvokeGroupAsync(string groupName, string methodName, objec
190190 throw new ArgumentNullException ( nameof ( groupName ) ) ;
191191 }
192192
193- var message = new InvocationMessage ( GetInvocationId ( ) , nonBlocking : true , target : methodName , argumentBindingException : null , arguments : args ) ;
193+ var message = new RedisExcludeClientsMessage ( GetInvocationId ( ) , nonBlocking : true , target : methodName , excludedIds : null , arguments : args ) ;
194+
195+ return PublishAsync ( _channelNamePrefix + ".group." + groupName , message ) ;
196+ }
197+
198+ public override Task InvokeGroupExceptAsync ( string groupName , string methodName , object [ ] args , IReadOnlyList < string > excludedIds )
199+ {
200+ if ( groupName == null )
201+ {
202+ throw new ArgumentNullException ( nameof ( groupName ) ) ;
203+ }
204+
205+ var message = new RedisExcludeClientsMessage ( GetInvocationId ( ) , nonBlocking : true , target : methodName , excludedIds : excludedIds , arguments : args ) ;
194206
195207 return PublishAsync ( _channelNamePrefix + ".group." + groupName , message ) ;
196208 }
@@ -547,11 +559,16 @@ private Task SubscribeToGroup(string groupChannel, GroupData group)
547559 {
548560 try
549561 {
550- var message = DeserializeMessage < HubInvocationMessage > ( data ) ;
562+ var message = DeserializeMessage < RedisExcludeClientsMessage > ( data ) ;
551563
552- var tasks = new List < Task > ( group . Connections . Count ) ;
564+ var tasks = new List < Task > ( ) ;
553565 foreach ( var groupConnection in group . Connections )
554566 {
567+ if ( message . ExcludedIds . Contains ( groupConnection . ConnectionId ) )
568+ {
569+ continue ;
570+ }
571+
555572 tasks . Add ( groupConnection . WriteAsync ( message ) ) ;
556573 }
557574
0 commit comments