public static void RunTest() { Console.WriteLine("Start"); myMq.Connect(); Console.WriteLine("Connected"); myMq.SubscribeConsumer("xx", true, null); string mes = Console.ReadLine(); myMq.PublishMessage("q1", mes, false, MessageType.TextMessage); myMq.PublishMessage("q2", mes, false, MessageType.TextMessage); myMq.PublishMessage("t1", mes, true, MessageType.TextMessage); myMq.PublishMessage("t2", mes, true, MessageType.TextMessage); mes = Console.ReadLine(); while (mes != "e") { List <KeyValuePair <string, string> > tempMes = myMq.ReadConsumerMessage(); foreach (var ms in tempMes) { Console.WriteLine(ms.Value + " " + ms.Key); } mes = Console.ReadLine(); } }
public bool ExecutionDeviceConnect() { isConnect = activeMQ.Connect(); return(isConnect); }