示例#1
0
        public BrokerSenderActor(ILogger <BrokerSenderActor> logger, IOptions <BrokerOptions> options, IBrokerSender brokerSender)
        {
            try
            {
                _logger       = logger;
                _options      = options.Value;
                _brokerSender = brokerSender;

                _logger.LogDebug("Starting broker sender actor");

                Receive <SendMessage>(msg =>
                {
                    _logger.LogDebug("Got SendMessage");

                    _brokerSender.Publish(msg.Payload);
                });
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "error while starting brokersenderactor");
            }
        }
示例#2
0
 public RemoteLaunchService(IBrokerSender brokerSender, ILogger <RemoteLaunchService> logger)
 {
     _brokerSender = brokerSender;
     _logger       = logger;
 }