message-brokers 1.1.4 → 1.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/README.md +3 -0
- package/lib/configs/mqConfigs.js +4 -0
- package/lib/message-brokers.js +10 -0
- package/package.json +8 -7
package/README.md
CHANGED
package/lib/configs/mqConfigs.js
CHANGED
|
@@ -12,6 +12,10 @@ const mqConfigs = [{
|
|
|
12
12
|
queueName: "datacloak.queue",
|
|
13
13
|
routingKeyList: ["har", "har_meta", "lab_api_response", "purchase_details", "lab_location_data", "input_object", "trending_data"],
|
|
14
14
|
priorityQueue: false
|
|
15
|
+
}, {
|
|
16
|
+
queueName: "raw-queue-processor",
|
|
17
|
+
routingKeyList: ["raw_queue"],
|
|
18
|
+
priorityQueue: false
|
|
15
19
|
}
|
|
16
20
|
// Example for priority queue.
|
|
17
21
|
// {
|
package/lib/message-brokers.js
CHANGED
|
@@ -104,6 +104,16 @@ class MessageBrokers {
|
|
|
104
104
|
const response = await AmqpController.publishMessage(hv_exchange, "trending_data", trending_data);
|
|
105
105
|
return response;
|
|
106
106
|
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* This function is used publish raw_queue into the exchange.
|
|
110
|
+
* @param {Object} raw_queue
|
|
111
|
+
* @returns
|
|
112
|
+
*/
|
|
113
|
+
async publishRawQueue(raw_queue) {
|
|
114
|
+
const response = await AmqpController.publishMessage(hv_exchange, "raw_queue", raw_queue);
|
|
115
|
+
return response;
|
|
116
|
+
}
|
|
107
117
|
async publishPendingMessageInCache() {
|
|
108
118
|
return await AmqpController.publishPendingMessageInCache();
|
|
109
119
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "message-brokers",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "This package contains functions to publish the messages into the message brokers like rabbitmq.",
|
|
5
5
|
"main": "lib/message-brokers.js",
|
|
6
6
|
"types": "lib/types/message-brokers.d.ts",
|
|
@@ -15,18 +15,19 @@
|
|
|
15
15
|
"build": "babel ./src -d ./lib && cp -r ./src/types/message-brokers.d.ts ./lib/types",
|
|
16
16
|
"prepublishOnly": "npm run build"
|
|
17
17
|
},
|
|
18
|
+
"repository": "https://code.360hvpl.com/development/message-brokers.git",
|
|
18
19
|
"author": "Akif Mohammed <akiif.dev@gmail.com> (https://akiif.dev)",
|
|
19
20
|
"license": "UNLICENSED",
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"amqplib": "^0.10.
|
|
22
|
+
"amqplib": "^0.10.8",
|
|
22
23
|
"chalk": "^5.4.1",
|
|
23
|
-
"dotenv": "^16.
|
|
24
|
-
"redis": "^
|
|
24
|
+
"dotenv": "^16.5.0",
|
|
25
|
+
"redis": "^5.0.1"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
|
-
"@babel/cli": "^7.
|
|
28
|
-
"@babel/core": "^7.
|
|
29
|
-
"@babel/preset-env": "^7.
|
|
28
|
+
"@babel/cli": "^7.27.2",
|
|
29
|
+
"@babel/core": "^7.27.1",
|
|
30
|
+
"@babel/preset-env": "^7.27.2"
|
|
30
31
|
},
|
|
31
32
|
"keywords": [
|
|
32
33
|
"amqp",
|