Example #1
0
        private BufferedQueue InitializeQueue(string queueName, int capacity)
        {
            var newQueue = new BufferedQueue(queueName, 3);

            newQueue.ReadyToPublish += QueuedItems_ReadyToPublish;
            _queuePool.Add(queueName, newQueue);
            _actionDictionary.Add(queueName, new List <Action <List <object>, string> >());
            return(newQueue);
        }
Example #2
0
        private MsgBroker()
        {
            //Initialize Default queues, robustness of queueing s/m is MsgBroker's responsibility
            _actionDictionary =
                new Dictionary <string, List <Action <List <object>, string> > >()
            {
                { "default", new List <Action <List <object>, string> >() }
            };

            var defaultQueue = new BufferedQueue("default", 5);

            defaultQueue.ReadyToPublish += QueuedItems_ReadyToPublish;
            _queuePool = new Dictionary <string, BufferedQueue>()
            {
                { "default", defaultQueue }
            };
        }