Exemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                #region 20200507
                {
                    //发布订阅模式
                    //PublishSubscribeConsumer.Show();
                }
                #endregion

                #region 20200508
                {
                    //DirectExchangeConsumerLogError.Show();
                }
                {
                    //FanoutExchange.Show();
                }
                {
                    TopicExchange.Show();
                }
                #endregion

                #region 20200509
                ConsumptionACKConfirm.Show();
                #endregion
                Console.Read();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.Read();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            try
            {
                #region 20200507
                {
                    //生产者消费者
                    //ProductionConsumer.Show();
                }
                {
                    //多生产者消费者
                    //Task.Run(() => { MultiProductionConsumer.Show01(); });
                    //Task.Run(() => { MultiProductionConsumer.Show02(); });
                    //Task.Run(() => { MultiProductionConsumer.Show03(); });
                }
                {
                    //互为生产者消费者
                    //Task.Run(() => { MutualProductionConsumer.ShowProductio(); });
                    //Task.Run(() => { MutualProductionConsumer.ShowConsumer(); });
                }
                {
                    //发布订阅模式
                    //PublishSubscribeConsumer.Show();
                }
                {
                    //秒杀
                    //SeckillConsumer.Show();
                }
                #endregion

                #region 20200508
                {
                    //DirectExchange.Show();
                }
                {
                    //FanoutExchange.Show();
                }
                {
                    //TopicExchange.Show();
                }
                {
                    //HeaderExchange.Show();
                }
                #endregion

                #region 20200509
                {
                    //PriorityQueue.Show();
                }
                {
                    //ProductionMessageTx.Show();
                }
                {
                    //ProductionMessageConfirm.Show();
                }
                {
                    ConsumptionACKConfirm.Show();
                }
                #endregion

                Console.Read();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }