Beispiel #1
0
 private static void TestSetupPriorityQueues()
 {
     PriorityRabbitSetupTest.CreateExchangesAndQueues();
     Global.DefaultWatcher.InfoFormat("Press anykey to publish random priority messages to those queues ...");
     Console.ReadKey(false);
     PublishingTest.PublishRandomPriorityMessages(3);
     Global.DefaultWatcher.InfoFormat("If you check queue Burrow.Queue.BurrowTestApp.Bunny_Priority0 -> 4, you should see approximately 2500 msgs on each");
     Console.WriteLine();
     Global.DefaultWatcher.InfoFormat("Now press anykey to destroy all the queues and the exchange");
     Console.ReadKey(false);
     PriorityRabbitSetupTest.DestroyExchangesAndQueues();
     Global.DefaultWatcher.InfoFormat("All priority queues Burrow.Queue.BurrowTestApp.Bunny_Priority0 -> 4 and exchange Burrow.Exchange should be deleted now");
     Console.ReadKey(false);
 }
Beispiel #2
0
        /// <summary>
        /// Run this test if you have RabbitMQ installed on localhost, otherwise change the connection string in app.config
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            Global.DefaultSerializer = new JsonSerializer();
            PublishingTest.PrintHelp();

            #region -- Run this test to create and destroy exchange, queues programatically --
            //RabbitSetupTest.CreateExchangesAndQueues();
            //Console.Write("Press anykey to destroy them!");
            //Console.ReadKey();
            //RabbitSetupTest.DestroyExchangesAndQueues();


            //RabbitSetupTest.CreateExchangesAndQueues("EEEEE", "QQQQQ", "RRRRR");
            //Console.Write("Press anykey to destroy them!");
            //Console.ReadKey();
            //RabbitSetupTest.DestroyExchangesAndQueues("EEEEE", "QQQQQ");
            //RabbitSetupTest.DestroyExchangesAndQueues("Burrow.Exchange.Error", "Burrow.Queue.Error");
            #endregion

            #region -- Run this test to create and destroy PRIORITY exchange, queues programatically --
            PriorityRabbitSetupTest.CreateExchangesAndQueues();
            //Console.Write("Press anykey to destroy them!");
            //Console.ReadKey();
            //PriorityRabbitSetupTest.DestroyExchangesAndQueues();
            #endregion


            #region -- Run this test to publish normal messages to queue --
            //Console.WriteLine("Press anykey to publish messages ..."); Console.ReadKey();
            //PublishingTest.Publish(2, 1000);
            #endregion

            #region -- Run this test to publish PRIORITY messages to queue --
            //Console.WriteLine("Press anykey to publish messages ..."); Console.ReadKey();
            PublishingTest.PublishRandomPriorityMessages(3);
            #endregion


            Console.WriteLine("Finished. Press anykey to quit!");
            Console.ReadKey();
        }