Esempio n. 1
0
        /// <summary>
        /// Returns the given queue.
        /// </summary>
        /// <param name="type">Queue type.</param>
        /// <returns>Queue instance.</returns>
        public virtual IMessageQueue GetQueue(MessageQueueType type)
        {
            IMessageQueue ret = null;

            switch (type)
            {
            case MessageQueueType.Email:
                ret = Queues.EmailQueue.Current;
                break;

            case MessageQueueType.Impressions:
                ret = Queues.ImpressionsQueue.Current;
                break;

            case MessageQueueType.Export:
                ret = Queues.ExportQueue.Current;
                break;

            case MessageQueueType.VideoPublish:
                ret = Queues.VideoPublishQueue.Current;
                break;
            }

            return(ret);
        }
Esempio n. 2
0
        internal MessageQueue(TwitchClient Client, MessageQueueType type)
        {
            _logger      = Bootstrapper.Logger;
            _nextWarning = WarningStart;
            _client      = Client;
            _type        = type;

            _nonceRand           = new Random();
            _pendingSends        = new ConcurrentQueue <Message>();
            _pendingSendsByNonce = new ConcurrentDictionary <int, string>();
        }
Esempio n. 3
0
        ///<summary>MessageQueueCreate</summary>
        ///<remarks>
        /// MessageQueueCreate(".", "QueueName", true, MessageQueueType.Publicqueue, ref exceptionMessage);
        ///</remarks>
        public static MessageQueue MessageQueueCreate
        (
            string computer,
            string queueName,
            bool transactional,
            MessageQueueType MessageQueueType,
            ref string exceptionMessage
        )
        {
            string       path         = MessageQueuePath(computer, queueName, MessageQueueType);
            MessageQueue messageQueue = null;

            messageQueue = MessageQueueCreate(path, transactional, ref exceptionMessage);
            return(messageQueue);
        }
Esempio n. 4
0
        ///<summary>MessageQueuePath</summary>
        public static string MessageQueuePath
        (
            string computer,
            string queueName,
            MessageQueueType MessageQueueType
        )
        {
            string path = null;

            if (MessageQueueType <= MessageQueueType.Privatequeue)
            {
                path = String.Format(MessageMessageQueuePathFormat[(int)MessageQueueType], computer, queueName);
            }
            else
            {
                path = String.Format(MessageMessageQueuePathFormat[(int)MessageQueueType], computer);
            }
            return(path);
        }
Esempio n. 5
0
 public InitialilizationInformation(MessageQueueType messageQueueType)
 {
     GcpMq            = new GcpMqEntity();
     RabbitMq         = new RabbitMqEntity();
     MessageQueueType = messageQueueType;
 }
Esempio n. 6
0
 public void Use(MessageQueueType type)
 {
     _queueType = type;
 }
Esempio n. 7
0
 public void Use(MessageQueueType type)
 {
     _queueType = type;
 }