Skip to content

Commit

Permalink
fix: not set nameSrv by default (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
gxcsoccer authored and denghongcai committed Apr 15, 2019
1 parent 150dc4c commit 7e5c6a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/client_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const defaultOptions = {
// 杭州深圳云环境:http://mq4finance-sz.addr.aliyun.com:8080/rocketmq/nsaddr4client-internal
onsAddr: 'http://onsaddr-internet.aliyun.com/rocketmq/nsaddr4client-internet',
// https://help.aliyun.com/document_detail/102895.html 阿里云产品更新,支持实例化
nameSrv: 'onsaddr.mq-internet-access.mq-internet.aliyuncs.com:80',
// nameSrv: 'onsaddr.mq-internet-access.mq-internet.aliyuncs.com:80',
onsChannel: 'ALIYUN', // CLOUD, ALIYUN, ALL
};

Expand Down
2 changes: 1 addition & 1 deletion lib/producer/mq_producer.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class MQProducer extends ClientConfig {
throw new Error(`no publish router data for topic: ${msg.topic}`);
}

if (this.namespace && !msg.topic.startsWith(this.namespace)) {
if (this.namespace && (!msg.topic.startsWith(this.namespace) || !msg.topic.startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX))) {
msg.topic = `${this.namespace}%${msg.topic}`;
}

Expand Down

0 comments on commit 7e5c6a4

Please sign in to comment.