【发布时间】:2021-01-31 17:51:36
【问题描述】:
我尝试在 NestJs 中发布到 kafka
async publish<T extends IEvent>(event: T) {
await this.client.connect();
await this.client.send('topic', event);
}
但还没有找到正确的方法,dispatchEvent 是受保护的。
编辑: 使用 cqrs 所以这是在订阅事件总线的事件发布者中。
【问题讨论】:
标签: nestjs