Skip to content

Commit

Permalink
refactor: update rabbitmq.js to use confirm channel for better reliab…
Browse files Browse the repository at this point in the history
…ility
  • Loading branch information
SevenWaysDP committed Jul 23, 2024
1 parent ad055c6 commit fc20b04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/rabbitmq.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Channel {
async connect() {
try {
const conn = await getConnection();
this.channel = await conn.createChannel();
this.channel = await conn.createConfirmChannel();
// the default is 0, 0 means get absolutely everything, internet claims this is limited by rabbitmq by 2000, which basically defeats the purpose of using separate processes
await this.channel.prefetch(Configuration.get('LEGACY_RABBITMQ_GLOBAL_PREFETCH_COUNT'), true);
await this.channel.assertQueue(this.queue, this.queueOptions);
Expand Down

0 comments on commit fc20b04

Please sign in to comment.