Example #1
0
 void initStartListenCmd()
 {
     StartListenCmd = App.Store.asyncAction <MqActions.StartListenCmd, bool>(
         async(dispatch, getState, instance) => {
         dispatch(instance);
         return(await Task.Run(() => {
             try {
                 activeMq.ListenTopic(instance.TopicName, instance.Id, null, mqService.CmdAccept);
                 return true;
             } catch (Exception e) {
                 dispatch(new SimpleAction(MqActions.START_LISTEN_CMD_FAILED, e));
             }
             return false;
         }));
     });
 }
Example #2
0
 /// <summary>
 /// update: 2018-10-31
 /// 交互方式更新为 mq
 /// </summary>
 public static void StartUseMq()
 {
     activeMq.Start();
     activeMq.ListenTopic("mes_online", Show);
 }