public InMemoryHost(IInMemoryHostConfiguration hostConfiguration, IInMemoryHostTopology hostTopology) : base(hostConfiguration, hostTopology) { _hostConfiguration = hostConfiguration; _messageFabric = new MessageFabric(hostConfiguration.TransportConcurrencyLimit); }
public GrpcHostNode(IMessageFabric messageFabric, NodeContext context) : base(messageFabric, context) { _hostTopology = new HostNodeTopology(); SetReady(); }
public RemoteNodeTopology(IGrpcNode node, IMessageFabric messageFabric) { _node = node; _messageFabric = messageFabric; _entries = new Dictionary <long, TopologyEntry>(); _receiverMap = new Dictionary <ReceiverKey, long>(); }
public InMemoryHost(IInMemoryHostConfiguration hostConfiguration, IInMemoryHostTopology hostTopology) : base(hostConfiguration, hostTopology) { _hostConfiguration = hostConfiguration; _messageFabric = new MessageFabric(hostConfiguration.TransportConcurrencyLimit); var cache = new GreenCache <InMemorySendTransport>(hostConfiguration.SendTransportCacheSettings); _index = cache.AddIndex("exchangeName", x => x.ExchangeName); }
public InMemoryHost(IInMemoryHostConfiguration hostConfiguration, int concurrencyLimit) : base(hostConfiguration) { _hostConfiguration = hostConfiguration; _messageFabric = new MessageFabric(concurrencyLimit); var cacheSettings = new CacheSettings(10000, TimeSpan.FromMinutes(1), TimeSpan.FromHours(24)); var cache = new GreenCache <InMemorySendTransport>(cacheSettings); _index = cache.AddIndex("exchangeName", x => x.ExchangeName); }
public InMemoryHost(int concurrencyLimit, IHostTopology topology, Uri baseAddress = null) { Topology = topology; _baseUri = baseAddress ?? new Uri("loopback://localhost/"); _messageFabric = new MessageFabric(concurrencyLimit); _receiveEndpoints = new ReceiveEndpointCollection(); var cache = new GreenCache <InMemorySendTransport>(10000, TimeSpan.FromMinutes(1), TimeSpan.FromHours(24), () => DateTime.UtcNow); _index = cache.AddIndex("exchangeName", x => x.ExchangeName); }
public InMemoryHost(IInMemoryHostConfiguration hostConfiguration, int concurrencyLimit, IHostTopology topology, Uri baseAddress = null) { _hostConfiguration = hostConfiguration; Topology = topology; Address = baseAddress ?? new Uri("loopback://localhost/"); _messageFabric = new MessageFabric(concurrencyLimit); _receiveEndpoints = new ReceiveEndpointCollection(); Add(_receiveEndpoints); var cacheSettings = new CacheSettings(10000, TimeSpan.FromMinutes(1), TimeSpan.FromHours(24)); var cache = new GreenCache <InMemorySendTransport>(cacheSettings); _index = cache.AddIndex("exchangeName", x => x.ExchangeName); }
public GrpcNode(IMessageFabric messageFabric, NodeContext context) { _messageFabric = messageFabric; _context = context; _remoteTopology = new RemoteNodeTopology(this, messageFabric); var outputOptions = new UnboundedChannelOptions { SingleWriter = false, SingleReader = true, AllowSynchronousContinuations = true }; _channel = System.Threading.Channels.Channel.CreateUnbounded <TransportMessage>(outputOptions); Writer = _channel.Writer; }
public GrpcTransportProvider(IGrpcHostConfiguration hostConfiguration, IGrpcTopologyConfiguration topologyConfiguration) { _hostConfiguration = hostConfiguration; _topologyConfiguration = topologyConfiguration; _messageFabric = new MessageFabric(); _nodeCollection = new NodeCollection(this, _messageFabric); _clients = new List <IGrpcClient>(); var transport = new GrpcTransportService(this, _hostConfiguration, _nodeCollection); _server = new Server(GetChannelOptions()) { Services = { TransportService.BindService(transport) }, Ports = { new ServerPort(hostConfiguration.BaseAddress.Host, hostConfiguration.BaseAddress.Port, ServerCredentials.Insecure) } }; var serverPort = _server.Ports.First(); HostAddress = new UriBuilder(_hostConfiguration.BaseAddress) { Host = serverPort.Host, Port = serverPort.BoundPort }.Uri; HostNodeContext = new HostNodeContext(HostAddress); _hostNode = new GrpcHostNode(_messageFabric, HostNodeContext); var observer = new NodeMessageFabricObserver(_nodeCollection, _hostNode); _messageFabric.ConnectMessageFabricObserver(observer); _startupTask = new Lazy <Task>(() => Task.Run(() => Startup())); }
public InMemoryConsumeTopologyBuilder(IMessageFabric messageFabric) { _messageFabric = messageFabric; }
public PublishEndpointTopologyBuilder(IMessageFabric messageFabric, Options options = Options.MaintainHierarchy) { _messageFabric = messageFabric; _options = options; }
public NodeCollection(ISupervisor supervisor, IMessageFabric messageFabric) { _supervisor = supervisor; _messageFabric = messageFabric; _nodes = new ConcurrentDictionary <Uri, IGrpcNode>(); }
public GrpcPublishTopologyBuilder(NodeContext context, IMessageFabric messageFabric) { _context = context; _messageFabric = messageFabric; }
public GrpcConsumeTopologyBuilder(NodeContext context, IMessageFabric fabric) { _context = context; _fabric = fabric; }