@parse/sqs-mq-adapter 2.1.0 → 2.2.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.2.0](https://github.com/parse-community/parse-server-sqs-mq-adapter/compare/2.1.1...2.2.0) (2026-02-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * Upgrade sqs-consumer from 12.0.0 to 14.2.1 ([#285](https://github.com/parse-community/parse-server-sqs-mq-adapter/issues/285)) ([ae6955e](https://github.com/parse-community/parse-server-sqs-mq-adapter/commit/ae6955eacbfdd8bb9609269bcd84417a55c3e823))
7
+
8
+ ## [2.1.1](https://github.com/parse-community/parse-server-sqs-mq-adapter/compare/2.1.0...2.1.1) (2026-01-31)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * Security upgrade qs from 6.14.0 to 6.14.1 ([#268](https://github.com/parse-community/parse-server-sqs-mq-adapter/issues/268)) ([a6cf866](https://github.com/parse-community/parse-server-sqs-mq-adapter/commit/a6cf866f76864aea4fabe3f758800c969da4c9b8))
14
+
1
15
  # [2.1.0](https://github.com/parse-community/parse-server-sqs-mq-adapter/compare/2.0.0...2.1.0) (2025-07-06)
2
16
 
3
17
 
package/README.md CHANGED
@@ -9,13 +9,15 @@
9
9
 
10
10
  ---
11
11
 
12
- The Parse Server AWS SQS Message Queue Adapter. This adapter allows a work queue to be spread across a cluster of machines.
12
+ The Parse Server AWS SQS Message Queue Adapter integrates Amazon SQS as the underlying message queue for Parse Server. It allows push notifications, jobs and LiveQuery events to be distributed across multiple Parse Server instances.
13
13
 
14
14
  ---
15
15
 
16
16
  - [Installation](#installation)
17
17
  - [Usage](#usage)
18
+ - [Integrate with Parse Server](#integrate-with-parse-server)
18
19
  - [Credentials](#credentials)
20
+ - [Push Notifications](#push-notifications)
19
21
  ## Installation
20
22
 
21
23
  `npm install --save @parse/sqs-mq-adapter`
@@ -38,6 +40,38 @@ config = {
38
40
  const parseServer = new ParseServer(config);
39
41
  ```
40
42
 
43
+
44
+ ### Integrate with Parse Server
45
+
46
+ 1. **Install dependencies**
47
+
48
+ ```bash
49
+ npm install parse-server @parse/sqs-mq-adapter
50
+ ```
51
+
52
+ 2. **Configure the adapter** in your Parse Server configuration:
53
+
54
+ ```js
55
+ const { ParseServer } = require('parse-server');
56
+ const { SQSEventEmitterMQ } = require('@parse/sqs-mq-adapter');
57
+
58
+ const config = {
59
+ databaseURI: 'mongodb://localhost:27017/app',
60
+ appId: 'myAppId',
61
+ masterKey: 'myMasterKey',
62
+ serverURL: 'https://example.com/parse',
63
+ queueOptions: {
64
+ messageQueueAdapter: SQSEventEmitterMQ,
65
+ queueUrl: 'https://sqs.us-east-1.amazonaws.com/XXX/Parse-Queue',
66
+ region: 'us-east-1',
67
+ },
68
+ };
69
+
70
+ const server = new ParseServer(config);
71
+ ```
72
+
73
+ 3. **Start Parse Server** and the adapter will listen to the configured SQS queue.
74
+
41
75
  See: [sqs-consumer](https://www.npmjs.com/package/sqs-consumer#options) for complete list of configuration options.
42
76
 
43
77
  ### Credentials
@@ -74,3 +108,30 @@ config = {
74
108
 
75
109
  const parseServer = new ParseServer(config);
76
110
  ```
111
+
112
+ ### Push Notifications
113
+
114
+ Parse Server sends push notifications as part of its workload using an internal push queue. When sending large amounts of push notifications this may impact other parts of the workload. This adapter allows Parse Server to only enqueue push notifications into a shared push queue so that another, dedicated Parse Server instance can process the push queue and send the push notification to the push service provider.
115
+
116
+ The Parse Server instance that should only enqueue pushes must have set `disablePushWorker: true`. The Parse Server instance that should process and send the enqueued pushes must omit this option, or set `disablePushWorker: false`.
117
+
118
+ ```js
119
+ const { ParseServer } = require('parse-server');
120
+ const { SQSEventEmitterMQ } = require('@parse/sqs-mq-adapter');
121
+
122
+ const config = {
123
+ push: {
124
+ adapter: new MyPushAdapter(),
125
+ queueOptions: {
126
+ messageQueueAdapter: SQSEventEmitterMQ,
127
+ queueUrl: 'https://sqs.us-east-1.amazonaws.com/XXX/Push-Queue',
128
+ region: 'us-east-1',
129
+ disablePushWorker: true,
130
+ },
131
+ },
132
+ };
133
+
134
+ const server = new ParseServer(config);
135
+ ```
136
+
137
+ This works for any instance constellation, with one or multiple instances enqueuing pushes and one or multiple instances sending pushes.
@@ -50,6 +50,7 @@ class Consumer extends events.EventEmitter {
50
50
 
51
51
  const handleMessage = async (message) => {
52
52
  this.emit('message', channel, message.Body);
53
+ return message;
53
54
  };
54
55
 
55
56
  const createOptions = Object.assign(this.config, { handleMessage });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parse/sqs-mq-adapter",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Spread work queue across cluster of parse servers using SQS",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -10,29 +10,29 @@
10
10
  "author": "Parse Platform",
11
11
  "license": "Apache-2.0",
12
12
  "dependencies": {
13
- "@aws-sdk/client-sqs": "3.840.0",
14
- "sqs-consumer": "12.0.0",
13
+ "@aws-sdk/client-sqs": "3.986.0",
14
+ "sqs-consumer": "14.2.1",
15
15
  "sqs-producer": "7.0.0"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "parse-server": "*"
19
19
  },
20
20
  "devDependencies": {
21
- "@eslint/js": "9.30.1",
21
+ "@eslint/js": "9.32.0",
22
22
  "@semantic-release/changelog": "6.0.3",
23
23
  "@semantic-release/commit-analyzer": "13.0.1",
24
24
  "@semantic-release/git": "10.0.1",
25
- "@semantic-release/github": "11.0.3",
26
- "@semantic-release/npm": "12.0.1",
27
- "@semantic-release/release-notes-generator": "14.0.3",
28
- "eslint": "9.30.1",
29
- "globals": "16.3.0",
30
- "jasmine": "5.8.0",
25
+ "@semantic-release/github": "12.0.5",
26
+ "@semantic-release/npm": "13.1.4",
27
+ "@semantic-release/release-notes-generator": "14.1.0",
28
+ "eslint": "9.39.2",
29
+ "globals": "17.3.0",
30
+ "jasmine": "6.0.0",
31
31
  "jasmine-spec-reporter": "7.0.0",
32
- "mongodb-runner": "5.9.2",
32
+ "mongodb-runner": "6.6.1",
33
33
  "nyc": "17.1.0",
34
- "parse-server": "8.2.1",
35
- "semantic-release": "24.2.5"
34
+ "parse-server": "9.2.0",
35
+ "semantic-release": "25.0.3"
36
36
  },
37
37
  "scripts": {
38
38
  "lint": "eslint --cache ./index.js ./lib/** ./spec/**/*.js",