message-brokers 1.2.0 → 1.3.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/lib/configs/mqConfigs.js +8 -0
- package/lib/message-brokers.js +20 -0
- package/package.json +1 -1
package/lib/configs/mqConfigs.js
CHANGED
|
@@ -16,6 +16,14 @@ const mqConfigs = [{
|
|
|
16
16
|
queueName: "raw-queue-processor",
|
|
17
17
|
routingKeyList: ["raw_queue"],
|
|
18
18
|
priorityQueue: false
|
|
19
|
+
}, {
|
|
20
|
+
queueName: "har-stub-processor",
|
|
21
|
+
routingKeyList: ["har_stub_to_report_gen"],
|
|
22
|
+
priorityQueue: false
|
|
23
|
+
}, {
|
|
24
|
+
queueName: "report-gen-response-processor",
|
|
25
|
+
routingKeyList: ["rg_response"],
|
|
26
|
+
priorityQueue: false
|
|
19
27
|
}
|
|
20
28
|
// Example for priority queue.
|
|
21
29
|
// {
|
package/lib/message-brokers.js
CHANGED
|
@@ -114,6 +114,26 @@ class MessageBrokers {
|
|
|
114
114
|
const response = await AmqpController.publishMessage(hv_exchange, "raw_queue", raw_queue);
|
|
115
115
|
return response;
|
|
116
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) {
|
|
124
|
+
const response = await AmqpController.publishMessage(hv_exchange, "har_stub_to_report_gen", har_stub_to_report_gen);
|
|
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) {
|
|
134
|
+
const response = await AmqpController.publishMessage(hv_exchange, "rg_response", rg_response);
|
|
135
|
+
return response;
|
|
136
|
+
}
|
|
117
137
|
async publishPendingMessageInCache() {
|
|
118
138
|
return await AmqpController.publishPendingMessageInCache();
|
|
119
139
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "message-brokers",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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",
|