public async Task Start() { var endpoint = await _broker.GetPublicEndPoint <SpotPriceDto>("prices"); _disp = _priceStream.Subscribe(endpoint); Log.Information("Started price publishing to 'prices'"); }
public async Task Start() { var endpoint = await _broker.GetPublicEndPoint <HeartbeatDto>("status"); _disp = _heartbeatStream.Select( _ => new HeartbeatDto { Instance = _host.InstanceID, Timestamp = DateTime.Now, Type = _host.ServiceType, Load = _host.GetLoad() }) .Subscribe(endpoint); Log.Information("Started heartbeat for {host}", _host); }