ทดลองปิด channel.prefetch

This commit is contained in:
AdisakKanthawilang 2024-11-18 11:01:44 +07:00
parent 01f2066075
commit a45f97e268

View file

@ -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)