Beispiel #1
0
        public QueueAdapter(IMessageQueueFactory messageFactory)
        {
            messagePublisherIsActive = false;

            if (!messageFactory.IsActive || !messageFactory.IsOpen)
            {
                return;
            }

            messagePublisherIsActive = true;
            messagePublisher         = messageFactory.CreatePublisher();
        }
Beispiel #2
0
        private void InitializePublisher()
        {
            if (messagePublisherInitialized)
            {
                return;
            }

            messagePublisherInitialized = true;

            if (!messageFactory.IsActive || !messageFactory.IsOpen)
            {
                return;
            }

            if (string.IsNullOrWhiteSpace(monitorExchange))
            {
                return;
            }

            messagePublisher       = messageFactory.CreatePublisher();
            messagePublisherActive = true;
        }