private async Task RemoveSubscriptionDatafeedAsync(long marketId, string sessionId) { try { await _datafeedHttpService.UnsubscribeMarketAsync(new DatafeedAction(marketId, sessionId)); } catch { _logger.LogInformation("UnsubscribeMarketAsync fails(exception)"); } }
private async Task UnsubscribeDatafeed(MessageHandler messageHandler) { DatafeedAction datafeedAction = new DatafeedAction(messageHandler.MarketId, _sessionId); try { if (await _datafeedHttpService.UnsubscribeMarketAsync(datafeedAction)) { _logger.LogInformation("UnsubscribeDatafeedAsync marketId={0} result=true", messageHandler.MarketId); } else { _logger.LogInformation("UnsubscribeDatafeedAsync marketId={0} result=false", messageHandler.MarketId); } } catch { } _messageBus.Unsubscribe <MarketUpdateDtoI, MessageHandler>(_exchangeName, "Update:" + messageHandler.MarketId.ToString()); }