Beispiel #1
0
 public static void SendMsgToQuene(string queneName, string msg)
 {
     using (ProducerQuene producer = new ProducerQuene(ipStr, queneName))
     {
         producer.SendMsg(msg);
     }
 }
Beispiel #2
0
        public void Test()
        {
            Console.WriteLine("初始化Producer。。。");
            ProducerQuene producer = new ProducerQuene("localhost:61616", "TestQuene");

            while (true)
            {
                Console.WriteLine("请输入字符来发送到队列:");
                string msg = Console.ReadLine();
                producer.SendMsg(msg);
                Console.WriteLine("发送完毕!");
            }
        }