zhangqian
2023-12-08 84fb8e390b83dc9482524c12d7af6c93405c3fc1
nsq/consumer.go
@@ -19,16 +19,14 @@
   switch topic {
   case fmt.Sprintf(constvar.NsqTopicScheduleTask, conf.Conf.NsqConf.NodeId):
      handler = new(ScheduleTask)
   case fmt.Sprintf(constvar.NsqTopicSendPlcAddress, conf.Conf.NsqConf.NodeId):
      handler = &PlcAddress{Topic: topic}
   case fmt.Sprintf(constvar.NsqTopicProcessParamsResponse, conf.Conf.NsqConf.NodeId):
      handler = &ProcessParams{Topic: topic}
   case fmt.Sprintf(constvar.NsqTopicApsProcessParams, conf.Conf.NsqConf.NodeId):
      handler = &ProcessParamsSync{Topic: topic}
   case fmt.Sprintf(constvar.NsqTopicDeviceUpdate, conf.Conf.NsqConf.NodeId):
      handler = &DeviceUpdate{Topic: topic}
   case fmt.Sprintf(constvar.NsqTopicPullDataResponse, conf.Conf.NsqConf.NodeId):
      handler = &PullDataResponse{Topic: topic}
   case fmt.Sprintf(constvar.NsqTopicSendDashboardData, conf.Conf.NsqConf.NodeId):
      handler = &Dashboard{Topic: topic}
   }
   c.AddHandler(handler.HandleMessage)
   return