In my service fabric environment, I would like to send data to a specified singleton instance. If I use the create service proxy function I can only use the logical url like this:
var client = ServiceProxy.Create<IServiceInterface>(new Uri(“fabric:/platform/service”), ServicePartitionKey.Singleton, TargetReplicaSelector.RandomInstance);
TargetReplicaSelector gives me only the RandomInstanc option. Random Instance is really not working for me. I Can easily lookup all available singleton instances in my environment with:
var resolver = ServicePartitionResolver.GetDefault(); var partition = await resolver.ResolveAsync(new Uri(“fabric:/platform/service”), ServicePartitionKey.Singleton, new CancellationToken()); var endpoints
= partition.Endpoints;
but I cannot create a ServiceProxy from the endpoint data I receive.