(topic: string, message: NonNullable<T>)
| 158 | |
| 159 | // 发布消息 |
| 160 | publish<T>(topic: string, message: NonNullable<T>) { |
| 161 | const fullTopic = `${this.name}${topic}`; |
| 162 | this.messageQueue.publish(fullTopic, message); |
| 163 | } |
| 164 | |
| 165 | // 只发布给当前环境 |
| 166 | emit<T>(topic: string, message: NonNullable<T>) { |