Beispiel #1
0
        private void runTests(Func <List <object> > callbackFN)
        {
            var q = new ECPR_RabbitMQ(this.config, false);
            var x = new List <string>()
            {
                "ebridged-cud"
            };

            q.getConnect(x);

            var data = callbackFN();

            int i = 0;

            Task[] taskSendMsg = new Task[data.Count];

            foreach (var msg in data)
            {
                taskSendMsg[i] = Task.Factory.StartNew(() =>
                {
                    q.publishMessage(JsonConvert.SerializeObject(msg, this.JSS), "ebridged-cud");
                });

                i += 1;
            }

            Task.WaitAll(taskSendMsg);
        }
Beispiel #2
0
        public void runTests()
        {
            var q = new ECPR_RabbitMQ(this.config);
            var x = new List <string>()
            {
                "ecpr-cud-ebridge"
            };

            q.getConnect(x);
            q.consumerInit(x);
        }