在无状态服务的所有活动实例上调用相同的方法 [英] Invoke same method on all active instances of a stateless service

查看:86
本文介绍了在无状态服务的所有活动实例上调用相同的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SFC中所有无状态服务的活动实例上调用相同方法的最佳方法是什么? 我的意思是对所有活动实例执行类似以下操作:

What is the best way to invoke the same method on all active instances of a stateless service in SFC? I mean doing something similar to below, just on ALL active instances:

var service = ServiceProxy.Create<IMyService>("<my-service-uri>");
await service.MyServiceMethod();

推荐答案

不幸的是,似乎无法将远程请求发送到特定的服务实例/副本.

Unfortunately looks like there is no way to send remoting request to the particular service instance / replica.

根据

According to the documentation of ServiceProxy.Create method there is a very limited control over target instance / replica selection (it is strict to the TargetReplicaSelector enumeration).

这篇关于在无状态服务的所有活动实例上调用相同的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆