Beispiel #1
0
        public PrimeCalculatorService(ILogger <PrimeCalculatorService> logger, IDistributedCache cache, IMessageQueueSender mqSender)
        {
            _logger   = logger;
            _cache    = cache;
            _mqSender = mqSender;

            _queueName = Constants.GetRabbitMQQueueName();
        }
Beispiel #2
0
        private void InitializeCentralQueueSender(string currentQueuePath)
        {
            var centralQueueName    = _settingsProvider.GetCentralMessageQueueName();
            var centralQueueMachine = _settingsProvider.GetCentralMessageQueueMachine();
            var centralQueuePath    = MessageQueueHelper.GetQueuePath(centralQueueName, centralQueueMachine);

            _msmqSender = _msmqFactory.GetSender(centralQueuePath);
            _msmqSender.Send(new AddSubscriberMessage
            {
                SubscriberQueue = currentQueuePath
            });
        }