试图获取演员服务中所有演员的列表,我得到一个 AggregateException。
System.AggregateException: FabricInvalidAddressException: NamedEndpoint 'V2Listener' not found in the address '{"Endpoints":{"V2_1Listener":"LautarosMonster:30006+f87ebfe0-9f5c-435f-ac5a-a62ab13eda5d-132059632019035414-bf7ac379-8bc1-c1 -339efc840b5b"}}' 用于分区 'f87ebfe0-9f5c-435f-ac5a-a62ab13eda5d'
在这里,我得到了 UserActor:
async public Task<List<string>> GetUserActors()
{
ContinuationToken continuationToken = null;
CancellationToken cancellationToken = new CancellationTokenSource().Token;
List<ActorInformation> activeActors = new List<ActorInformation>();
do
{
var proxy = GetUserActorServiceProxy();
PagedResult<ActorInformation> page = await proxy.GetActorsAsync(continuationToken, cancellationToken);
activeActors.AddRange(page.Items.Where(x => x.IsActive));
continuationToken = page.ContinuationToken;
}
while (continuationToken != null);
return activeActors.Select(aa => aa.ActorId.ToString()).ToList();
}
我很确定我的 URI 命名约定是正确的。这就是我获得actorServiceProxy的方式
public IActorService GetUserActorServiceProxy() { var proxy = ActorServiceProxy.Create(new Uri("fabric:/ECommerce/UserActorService"), 0); return proxy; }
应用程序名称是“ECommerce”,我试图调用的服务是“UserActor”
在我调用 proxy.GetActorsAsync 的 PagedResult 行上引发异常