test
This commit is contained in:
parent
5a9da1d428
commit
0c70fe006f
1 changed files with 3 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ export async function init() {
|
|||
|
||||
channel.assertQueue(queue, { durable: true }); //----> (1.5) assert queue and set durable (if "true" save to disk on RabbitMQ)
|
||||
channel.assertQueue(queue_org, { durable: true });
|
||||
// channel.prefetch(1);
|
||||
channel.prefetch(1);
|
||||
|
||||
sendToQueue = (payload: any, persistent = true) => {
|
||||
//----> (2) sendQueue To RabbitMQ and set persistent (if "true" redo the failed queue when server run again)
|
||||
|
|
@ -42,8 +42,8 @@ export async function init() {
|
|||
|
||||
console.log("[AMQ] Listening for message...");
|
||||
|
||||
createConsumer(queue, channel, handler); //----> (3) Process Consumer
|
||||
createConsumer(queue_org, channel, handler_org);
|
||||
await createConsumer(queue, channel, handler); //----> (3) Process Consumer
|
||||
await createConsumer(queue_org, channel, handler_org);
|
||||
// createConsumer(queue2, channel, handler2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue