Multiple v2 Service Remoting Endpoints in Service Fabric

282 Views Asked by At

I'm using Service Fabric v6.1.472. We're trying to switch to using Service Fabric Remoting (https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication-remoting), specifically to use the v2 listeners.

The problem I'm running in to is that the documentation only says how to do it using a single listener via the extension method:

protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners()
{
    return this.CreateServiceRemotingInstanceListeners();
}

This assumes that

  1. The service class implements the remoting interface
  2. There is only one remoting v2 endpoint in the host (I need multiple endpoints).

When digging into the decompiled code, it looks like this extension method uses a hard-coded endpoint name, which would make it impossible to use this for multiple remoting endpoints. Further digging revealed that many of the methods used by the extension method are marked internal.

Short of creating my own library, has anyone else found a workaround to this bit of bad design?

Edit

Microsoft updated their documentation. Under the header "Using explicit V2 classes to use the V2 stack," it is clear how to create listeners without the extension method.

0

There are 0 best solutions below