Skip to content

Commit

Permalink
feat(rabbitmq): Add priority to restarts
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed Mar 25, 2020
1 parent ea7369b commit f78c590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/framework/services/RabbitMq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class RabbitMqService extends IMService {
});

await this.channelStartup.prefetch(1);
await this.channelStartup.assertQueue(this.qNameStartup, { durable: true, autoDelete: false });
await this.channelStartup.assertQueue(this.qNameStartup, { durable: true, autoDelete: false, maxPriority: 10 });

// Reset the ticket
this.startTicket = null;
Expand All @@ -173,7 +173,7 @@ export class RabbitMqService extends IMService {
this.startTicket = msg;
resolve();
},
{ noAck: false }
{ noAck: false, priority: this.client.hasStarted ? 1 : 0 }
);
});
}
Expand Down

0 comments on commit f78c590

Please sign in to comment.