1

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.

Rénald
  • 1,412
  • 12
  • 29
Serge
  • 251
  • 1
  • 8

1 Answers1

2

You could use HTTP communication for that.

Have a look at this thread: Targeting a stateless replica on the same node when communicating over the ServiceProxy client

Community
  • 1
  • 1
LoekD
  • 11,402
  • 17
  • 27