浏览代码

mq数据类型修改

lrf 1 年之前
父节点
当前提交
c42b0b1154
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/service/chatMq.service.ts

+ 1 - 1
src/service/chatMq.service.ts

@@ -37,7 +37,7 @@ export class ChatMqService {
 
   // 向交换机发送消息
   async sendExMsg(routingKey: string, data: any) {
-    this.channelWrapper.publish(this.exName, routingKey, Buffer.from(data));
+    this.channelWrapper.publish(this.exName, routingKey, data);
   }
   // 测试,自产自销,前端使用前,连消费者也产生出来,看看好不好使,好使了在注释掉.
   async reciveMsg(msg) {