Explorar el Código

test: get message id

lijian hace 2 años
padre
commit
85fe0d75e4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      pkg/mqtt/connection.go

+ 1 - 1
pkg/mqtt/connection.go

@@ -229,7 +229,7 @@ func (c *Connection) RcvMsgFromClient() {
 			server.Log.Infof("device %d, connected to server now, host: %s", c.DeviceID, host)
 
 		case *Publish:
-			server.Log.Infof("%s, publish topic: %s", host, msg.TopicName)
+			server.Log.Infof("%s, publish topic: %s, msgId: %v", host, msg.TopicName, msg.MessageID)
 			err = c.Mgr.PublishMessage2Server(c.DeviceCode, c.VendorId, msg)
 			if err != nil {
 				server.Log.Errorf("PublishMessage2Server error:%s", err.Error())