@xuda.io/account_module 1.2.2006 → 1.2.2007
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/index_ms.mjs +9 -0
- package/package.json +1 -1
package/index_ms.mjs
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
// Queue target : account_module
|
|
4
4
|
// =====================================================
|
|
5
5
|
|
|
6
|
+
// --- AMQP Connection & Channel ---
|
|
7
|
+
const conn = await amqplib.connect('amqp://localhost');
|
|
8
|
+
const channel = await conn.createChannel();
|
|
9
|
+
await channel.assertQueue(_account_module-undefined_ch, { durable: false });
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
const send_to_queue =async function(ms_method, ...args) {
|
|
7
15
|
|
|
8
16
|
global[`_${global.module_in}_ch`].sendToQueue(
|
|
@@ -11,6 +19,7 @@ const send_to_queue =async function(ms_method, ...args) {
|
|
|
11
19
|
JSON.stringify({
|
|
12
20
|
ms_method,
|
|
13
21
|
data: args,
|
|
22
|
+
cb:_account_module-undefined_ch
|
|
14
23
|
})
|
|
15
24
|
)
|
|
16
25
|
);
|