Comparing version 3.6.1 to 3.6.2
3.6.2 / 2019-04-16 | ||
================== | ||
**fixes** | ||
* [[`cb385e3`](http://github.com/ali-sdk/ali-ons/commit/cb385e31c486877b625eb6b27a69245c1d43e65d)] - fix: namespace logic (#78) (zōng yǔ <<gxcsoccer@users.noreply.github.com>>) | ||
3.6.1 / 2019-04-15 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -5,2 +5,3 @@ 'use strict'; | ||
const address = require('address'); | ||
const MixAll = require('./mix_all'); | ||
@@ -71,2 +72,10 @@ const defaultOptions = { | ||
formatTopic(topic) { | ||
if (this.namespace && (!topic.startsWith(this.namespace) && | ||
!topic.startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX))) { | ||
topic = `${this.namespace}%${topic}`; | ||
} | ||
return topic; | ||
} | ||
/** | ||
@@ -73,0 +82,0 @@ * 将实例名修改为进程号 |
@@ -187,5 +187,3 @@ 'use strict'; | ||
// 添加 namespace 前缀 | ||
if (this.namespace && !topic.startsWith(this.namespace)) { | ||
topic = `${this.namespace}%${topic}`; | ||
} | ||
topic = this.formatTopic(topic); | ||
@@ -192,0 +190,0 @@ if (arguments.length === 2) { |
@@ -196,5 +196,3 @@ 'use strict'; | ||
if (this.namespace && (!msg.topic.startsWith(this.namespace) || !msg.topic.startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX))) { | ||
msg.topic = `${this.namespace}%${msg.topic}`; | ||
} | ||
msg.topic = this.formatTopic(msg.topic); | ||
@@ -201,0 +199,0 @@ const maxTimeout = this.options.sendMsgTimeout + 1000; |
{ | ||
"name": "ali-ons", | ||
"version": "3.6.1", | ||
"version": "3.6.2", | ||
"description": "Aliyun Open Notification Service Client", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
152370
4144