@adobe/spacecat-shared-utils 1.112.5 → 1.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/sqs.js +16 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [@adobe/spacecat-shared-utils-v1.113.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.112.5...@adobe/spacecat-shared-utils-v1.113.0) (2026-04-29)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **utils/sqs:** add MessageDeduplicationId support for FIFO sends ([#1566](https://github.com/adobe/spacecat-shared/issues/1566)) ([b3b9511](https://github.com/adobe/spacecat-shared/commit/b3b95112d14ac9f07dcfae8baa1599c1429ea1f7))
|
|
6
|
+
|
|
1
7
|
## [@adobe/spacecat-shared-utils-v1.112.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.112.4...@adobe/spacecat-shared-utils-v1.112.5) (2026-04-10)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/package.json
CHANGED
package/src/sqs.js
CHANGED
|
@@ -57,9 +57,16 @@ class SQS {
|
|
|
57
57
|
* @param {object} message - The message body to send.
|
|
58
58
|
* Can include traceId for propagation or set to null to opt-out.
|
|
59
59
|
* @param {string} messageGroupId - (Optional) The message group ID for FIFO queues.
|
|
60
|
+
* @param {string} messageDeduplicationId - (Optional) The deduplication ID for FIFO
|
|
61
|
+
* queues that have content-based deduplication disabled. Ignored on standard queues.
|
|
60
62
|
* @return {Promise<void>}
|
|
61
63
|
*/
|
|
62
|
-
async sendMessage(
|
|
64
|
+
async sendMessage(
|
|
65
|
+
queueUrl,
|
|
66
|
+
message,
|
|
67
|
+
messageGroupId = undefined,
|
|
68
|
+
messageDeduplicationId = undefined,
|
|
69
|
+
) {
|
|
63
70
|
const body = {
|
|
64
71
|
...message,
|
|
65
72
|
timestamp: new Date().toISOString(),
|
|
@@ -87,9 +94,14 @@ class SQS {
|
|
|
87
94
|
QueueUrl: queueUrl,
|
|
88
95
|
};
|
|
89
96
|
|
|
90
|
-
// Only include
|
|
91
|
-
if (SQS.#isFifoQueue(queueUrl)
|
|
92
|
-
|
|
97
|
+
// Only include FIFO-specific attributes if the queue is a FIFO queue
|
|
98
|
+
if (SQS.#isFifoQueue(queueUrl)) {
|
|
99
|
+
if (hasText(messageGroupId)) {
|
|
100
|
+
params.MessageGroupId = messageGroupId;
|
|
101
|
+
}
|
|
102
|
+
if (hasText(messageDeduplicationId)) {
|
|
103
|
+
params.MessageDeduplicationId = messageDeduplicationId;
|
|
104
|
+
}
|
|
93
105
|
}
|
|
94
106
|
|
|
95
107
|
const msgCommand = new SendMessageCommand(params);
|