message-brokers 1.4.0 → 1.4.1
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/lib/configs/mqConfigs.js +1 -12
- package/lib/message-brokers.js +2 -22
- package/package.json +1 -1
package/lib/configs/mqConfigs.js
CHANGED
|
@@ -15,18 +15,7 @@ const mqConfigs = [{
|
|
|
15
15
|
}, {
|
|
16
16
|
queueName: "raw-queue-processor",
|
|
17
17
|
routingKeyList: ["raw_queue"],
|
|
18
|
-
priorityQueue:
|
|
19
|
-
maxPriority: 5
|
|
20
|
-
}, {
|
|
21
|
-
queueName: "har-stub-processor",
|
|
22
|
-
routingKeyList: ["har_stub_to_report_gen"],
|
|
23
|
-
priorityQueue: true,
|
|
24
|
-
maxPriority: 5
|
|
25
|
-
}, {
|
|
26
|
-
queueName: "report-gen-response-processor",
|
|
27
|
-
routingKeyList: ["rg_response"],
|
|
28
|
-
priorityQueue: true,
|
|
29
|
-
maxPriority: 5
|
|
18
|
+
priorityQueue: false
|
|
30
19
|
}
|
|
31
20
|
// Example for priority queue.
|
|
32
21
|
// {
|
package/lib/message-brokers.js
CHANGED
|
@@ -110,28 +110,8 @@ class MessageBrokers {
|
|
|
110
110
|
* @param {Object} raw_queue
|
|
111
111
|
* @returns
|
|
112
112
|
*/
|
|
113
|
-
async publishRawQueue(raw_queue
|
|
114
|
-
const response = await AmqpController.publishMessage(hv_exchange, "raw_queue", raw_queue
|
|
115
|
-
return response;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* This function is used to publish request that parser sends to report_gen into the exchange.
|
|
120
|
-
* @param {Object} har_stub_to_report_gen
|
|
121
|
-
* @returns
|
|
122
|
-
*/
|
|
123
|
-
async publishHarStubWithRouteParams(har_stub_to_report_gen, priority) {
|
|
124
|
-
const response = await AmqpController.publishMessage(hv_exchange, "har_stub_to_report_gen", har_stub_to_report_gen, priority);
|
|
125
|
-
return response;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* This function is used to publish report_gen's response to parser's request into the exchange.
|
|
130
|
-
* @param {Object} rg_response
|
|
131
|
-
* @returns
|
|
132
|
-
*/
|
|
133
|
-
async publishReportgenResponse(rg_response, priority) {
|
|
134
|
-
const response = await AmqpController.publishMessage(hv_exchange, "rg_response", rg_response, priority);
|
|
113
|
+
async publishRawQueue(raw_queue) {
|
|
114
|
+
const response = await AmqpController.publishMessage(hv_exchange, "raw_queue", raw_queue);
|
|
135
115
|
return response;
|
|
136
116
|
}
|
|
137
117
|
async publishPendingMessageInCache() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "message-brokers",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
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",
|