Example #1
0
        public void AddSender(string name, Sender sender)
        {
            _senderCacheLock.EnterWriteLock();

            if (_senders.ContainsKey(name))
            {
                _senders[name] = sender;
            }
            else
            {
                _senders.Add(name, sender);
            }

            _senderCacheLock.ExitWriteLock();
        }
Example #2
0
        private Sender CreateTopicSender(string topicName)
        {
            _validator.EnsureTopic(topicName);
            ISendClient client = _clientFactory.CreateTopicClient(topicName);
            Sender sender = new Sender(client);

            return sender;
        }
Example #3
0
        private Sender CreateQueueSender(string queueName)
        {
            _validator.EnsureQueue(queueName);
            ISendClient client = _clientFactory.CreateQueueClient(queueName);
            Sender sender = new Sender(client);

            return sender;
        }