fix
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package consumer
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fusenapi/utils/websocket_data"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
@@ -10,5 +12,11 @@ type MqConsumerRenderAssemble struct {
|
||||
|
||||
func (m *MqConsumerRenderAssemble) Run(data []byte) error {
|
||||
logx.Info("收到需要组装的消息:", string(data))
|
||||
var parseInfo websocket_data.AssembleRenderData
|
||||
if err := json.Unmarshal(data, &parseInfo); err != nil {
|
||||
logx.Error("MqConsumerRenderAssemble数据格式错误:", err)
|
||||
return nil //不返回错误就删除消息
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user