Azure service fabric 两个端点有状态服务不工作

Azure service fabric 两个端点有状态服务不工作,azure-service-fabric,service-fabric-stateful,Azure Service Fabric,Service Fabric Stateful,我已将servicefabric有状态服务设置为使用两个侦听器端点 ServiceRemoting V2 WCF远程处理 我的CreateServiceReplicaListerners()如下所示- return new[] { new ServiceReplicaListener((c) => new FabricTransportServiceRemotingListener(c, this),

我已将servicefabric有状态服务设置为使用两个侦听器端点

  • ServiceRemoting V2
  • WCF远程处理
  • 我的
    CreateServiceReplicaListerners()
    如下所示-

    return new[]
                 {
                     new ServiceReplicaListener((c) => new FabricTransportServiceRemotingListener(c, this),
                        "dataServiceRemotingListener"),
    
                     new ServiceReplicaListener((context) =>
                        new WcfCommunicationListener<IReferenceDataService>(
                            wcfServiceObject:this,
                            serviceContext:context,
                            //
                            // The name of the endpoint configured in the ServiceManifest under the Endpoints section
                            // that identifies the endpoint that the WCF ServiceHost should listen on.
                            //
                            endpointResourceName: "WcfDataServiceEndpoint",
    
                            //
                            // Populate the binding information that you want the service to use.
                            //
                            listenerBinding: WcfUtility.CreateTcpListenerBinding()
                        ), "dataServiceWCFListener")
                 };
    

    创建代理时指定侦听器名称

     var proxy = _serviceProxyFactory.CreateServiceProxy<IMyService>(MyServiceUri, new ServicePartitionKey(partitionKey), TargetReplicaSelector.PrimaryReplica, "dataServiceRemotingListener");
    
    var proxy=\u serviceProxyFactory.CreateServiceProxy(MyServiceUri、新ServicePartitionKey(partitionKey)、TargetReplicaSelector.primaryplica、“DataServiceMotingListener”);
    
    如果省略名称,将使用第一个端点。根据您返回侦听器的顺序,远程处理是否有效


    另外,请确保在服务清单中声明了2个端点

    您的客户端代码是什么样子的?您使用什么URI连接?@HiredMind使用客户端调用详细信息更新了我的问题。谢谢@LoeKD
     var proxy = _serviceProxyFactory.CreateServiceProxy<IMyService>(MyServiceUri, new ServicePartitionKey(partitionKey), TargetReplicaSelector.PrimaryReplica, "dataServiceRemotingListener");