Invoke same method on all active instances of a stateless service

喜欢而已 提交于 2020-01-06 11:49:36

问题


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();

回答1:


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).



来源:https://stackoverflow.com/questions/51243097/invoke-same-method-on-all-active-instances-of-a-stateless-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!