Skip to content

Commit 77b55ac

Browse files
committed
Adjust logic to name an SQS queue used to subscribe to an SNS topic
1 parent b814045 commit 77b55ac

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.releases/4.17.0.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
**New Features**
22

3-
* Added the ability to specify an `identifier` when instantiating the `AwsRouter` or `AwsPublisher` classes.
3+
* Added the ability to specify an `identifier` when instantiating the `AwsRouter` or `AwsPublisher` classes.
4+
* Adjusted the logic used by the `AwsRouter` to name an SQS queue that is used to subscribe to an SNS topic.

messaging/publishers/AwsPublisher.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ module.exports = (() => {
202202
const messageTypeRegex = /(.*)#(.*)$/;
203203

204204
function getSubscriptionQueue(topic) {
205+
if (topic.endsWith(this._publisherId)) {
206+
return topic;
207+
}
208+
205209
return `${topic}-${this._publisherId}`;
206210
}
207211

0 commit comments

Comments
 (0)