OmexServiceProxyFactory doesn't support independent configuration
K-Cully opened this issue · comments
When creating a FabricTransportServiceRemotingClientFactory for secure remoting, the transport settings must be provided at initialization time.
Since OmexServiceProxyFactory forces the use of a static factory instance, and this instance encapsulates a FabricTransportServiceRemotingClientFactory, only one secure remoting connection can be set up through the static instance without issues.
The fix should be to update the proxy creation to support DI correctly for the generated IServiceProxyFactory instance - https://learn.microsoft.com/en-us/dotnet/api/microsoft.servicefabric.services.remoting.client.serviceproxyfactory?view=azure-dotnet
There is no real need to specify more than one set of transport settings.
We should be able to revert the last changes (#556) too, as transport settings added to the "TransportSettings" section of the service manifest will be picked up by FabricTransportServiceRemotingClientFactory, without specifying any additional security params.
See: https://github.com/microsoft/service-fabric-services-and-actors-dotnet/blob/fe1f3b2bf336fab9b97a846414c7b7a57f07833a/src/Microsoft.ServiceFabric.Services.Remoting/V2/FabricTransport/Client/FabricTransportServiceRemotingClientFactory.cs#L226