Service Fabric: Calls between services are delayed?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 04:42:09

The MaxConcurrentCalls setting seemed to be what I needed.

When connecting to service:

            FabricTransportSettings transportSettings = new FabricTransportSettings
            {
                MaxConcurrentCalls = 32
            };

            ServiceProxyFactory serviceProxyFactory = new ServiceProxyFactory(
                (c) => new FabricTransportServiceRemotingClientFactory(transportSettings));

            service = serviceProxyFactory.CreateServiceProxy<T>(serviceUri);

Creating service listeners:

protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners()
    {
        FabricTransportListenerSettings listenerSettings = new FabricTransportListenerSettings
        {
            MaxConcurrentCalls = 32
        };
        return new[]
        {
            new ServiceInstanceListener(
            (context) => new FabricTransportServiceRemotingListener(context,this,listenerSettings))
        };
    }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!