예제 #1
0
 public void AlertStarted()
 {
     AlertRiskOfficer(null, "Market maker started", EventTypeEnum.StatusInfo);
     _rabbitMqService.GetProducer(_settings.Nested(s => s.RabbitMq.Publishers.Started), true,
                                  _rabbitMqService.GetJsonSerializer <StartedMessage>())
     .ProduceAsync(new StartedMessage());
 }
 public void Start()
 {
     _eventsPublisher = _rabbitMqService.GetProducer(
         new RabbitMqSettings
     {
         ConnectionString = _marginSettings.MtRabbitMqConnString,
         ExchangeName     = _marginSettings.RabbitMqQueues.MarginTradingEnabledChanged.ExchangeName
     },
         _rabbitMqService.GetJsonSerializer <MarginTradingEnabledChangedMessage>());
 }
        public EventSender(
            IRabbitMqService rabbitMqService,
            IConvertService convertService,
            ILog log,
            ISystemClock systemClock,
            string settingsChangedConnectionString,
            string settingsChangedExchangeName)
        {
            _convertService = convertService;
            _log            = log;
            _systemClock    = systemClock;

            _settingsChangedMessageProducer =
                rabbitMqService.GetProducer(settingsChangedConnectionString, settingsChangedExchangeName, true,
                                            rabbitMqService.GetJsonSerializer <SettingsChangedEvent>());
        }