We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
变量多次实例化Producer会出现 以下问题: No topic route info in name server for the topic: TBW102 See http://rocketmq.apache.org/docs/faq/ for further details. See http://rocketmq.apache.org/docs/faq/ for further details.
如果是仅实例一次 client 就不会出现这个问题 如果producer 多次实例化就就会出现
class MQProducerService extends Service { async send(topic, tags, payload, opts) { const logger = this.ctx.logger; const producer = new Producer(opts); let sendResult; try { const msg = new Message(topic, tags, JSON.stringify(payload)); sendResult = await producer.send(msg); } catch (err) { logger.error(err); } return sendResult; } }
The text was updated successfully, but these errors were encountered:
用法不太对,不要每次都重新初始化 Provider,要复用
Sorry, something went wrong.
那有没有方法可以 销毁 Provider? 因为Producer 需要动态实例化
同样的问题, 我是多次实例化Consumer时报错.。 我的需求是能在多个 nameSrv、namespace、topic等不同的 mq之间切换连接。 如果能够复用的话当然也可以, 不过我没有找到相关文档。
No branches or pull requests
变量多次实例化Producer会出现 以下问题:
No topic route info in name server for the topic: TBW102
See http://rocketmq.apache.org/docs/faq/ for further details.
See http://rocketmq.apache.org/docs/faq/ for further details.
如果是仅实例一次 client 就不会出现这个问题
如果producer 多次实例化就就会出现
class MQProducerService extends Service { async send(topic, tags, payload, opts) { const logger = this.ctx.logger; const producer = new Producer(opts); let sendResult; try { const msg = new Message(topic, tags, JSON.stringify(payload)); sendResult = await producer.send(msg); } catch (err) { logger.error(err); } return sendResult; } }
The text was updated successfully, but these errors were encountered: