private static void TestSendAndReceiveMessage(TestSingleQueue queue) { queue.SendTextMessage("1", "2", "3", "4"); while (true) { var msg = queue.ReceiveMessage(); if (string.IsNullOrEmpty(msg)) { break; } Console.WriteLine("队列:{0} 收到消息:{1}", queue.QueueName, msg); } }
static void SingleQueueTest() { TestSingleQueue queue = new TestSingleQueue(); TestSendAndReceiveMessage(queue); }