public async Task Start() { var endpoint = await _broker.GetPublicEndPoint<SpotPriceDto>("prices"); _disp = _priceStream.Subscribe(endpoint); Log.Information("Started price publishing to 'prices'"); } }
private void StartPricePublisher() { var priceTrunkStream = _service.GetAllPriceUpdates(); // TODO dispose this when service host goes down var priceTrunk = new PricePublisher(priceTrunkStream, _broker); priceTrunk.Start().Wait(); }