Browse Source

修改SendMsg发送

master v1.2.1
guzeng 1 year ago
parent
commit
b64b4697ca
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      conn.go

+ 1
- 1
conn.go View File

@ -52,7 +52,7 @@ func Conn(group string, resolver []string) {
func SendMsg(ctx context.Context, topic, tag string, message []byte) (*primitive.SendResult, error) { func SendMsg(ctx context.Context, topic, tag string, message []byte) (*primitive.SendResult, error) {
if MqPool == nil { if MqPool == nil {
return &res, errors.New("Mq未链接")
return nil, errors.New("Mq未链接")
} }
msg := primitive.NewMessage(topic, message) msg := primitive.NewMessage(topic, message)
msg.WithTag(tag) msg.WithTag(tag)


Loading…
Cancel
Save