message-brokers 1.9.1 → 1.9.2

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 CHANGED
@@ -180,6 +180,9 @@ messageBrokers.publishNotificationMessagesLogs(notification_messages_logs);
180
180
  // Publish amqp_lab_api_response
181
181
  messageBrokers.publishAmqpLabApiResponse(amqp_lab_api_response);
182
182
 
183
+ // Publish merged_lab_api_response
184
+ messageBrokers.publishAmqpMergedLabApiResponse(merged_lab_api_response);
185
+
183
186
  // Publish billing_events
184
187
  messageBrokers.publishBillingEvents(billing_events);
185
188
  ```
@@ -20,6 +20,10 @@ const mqConfigs = [{
20
20
  queueName: "v2.lab-data.queue",
21
21
  routingKeyList: ["lab_api_response.amqp"],
22
22
  priorityQueue: false
23
+ }, {
24
+ queueName: "v2.merged-lab-data.queue",
25
+ routingKeyList: ["merged_lab_api_response.amqp"],
26
+ priorityQueue: false
23
27
  }, {
24
28
  queueName: "billing.events",
25
29
  routingKeyList: ["billing"],
@@ -146,6 +146,16 @@ class MessageBrokers {
146
146
  return response;
147
147
  }
148
148
 
149
+ /**
150
+ * This function is used publish merged_lab_api_response into the exchange.
151
+ * @param {Object} merged_lab_api_response
152
+ * @returns
153
+ */
154
+ async publishAmqpMergedLabApiResponse(merged_lab_api_response) {
155
+ const response = await AmqpController.publishMessage(hv_exchange, "merged_lab_api_response.amqp", merged_lab_api_response);
156
+ return response;
157
+ }
158
+
149
159
  /**
150
160
  * This function is used publish billing events into the exchange.
151
161
  * @param {Object} amqp_lab_api_response
package/lib/types CHANGED
@@ -102,6 +102,13 @@ declare module "message-brokers" {
102
102
  */
103
103
  publishTrendingData(trending_data: object): Promise<PublishResponse>;
104
104
 
105
+ /**
106
+ * Publishes a merged lab API response into the exchange.
107
+ * @param merged_lab_api_response - The merged lab API response object to be published.
108
+ * @returns A promise that resolves to a response object.
109
+ */
110
+ publishAmqpMergedLabApiResponse(merged_lab_api_response: object): Promise<PublishResponse>;
111
+
105
112
  /**
106
113
  * Publishes all pending messages stored in the cache.
107
114
  * @returns A promise that resolves to a response object indicating the result of the operation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "message-brokers",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
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",