@go-mailer/vertebra 3.3.0 → 3.3.1

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.
@@ -102,11 +102,11 @@ class Broker {
102
102
  this.connector = connector;
103
103
  }
104
104
 
105
- async subscribe(queue_name, handler = console.log, prefetch = 1) {
105
+ async subscribe(queue_name, handler = console.log, prefetch = 0) {
106
106
  try {
107
107
  if (!this.channel) return;
108
108
  this.channel.assertQueue(queue_name, {});
109
- this.channel.prefetch(prefetch);
109
+ if(!isNaN(prefetch) && prefetch > 0) this.channel.prefetch(prefetch);
110
110
  this.channel.consume(queue_name, handler);
111
111
  } catch (e) {
112
112
  console.log(`RabbitMQ subscribe(): ${e.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-mailer/vertebra",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Go-Mailer vertebra",
5
5
  "main": "index.js",
6
6
  "scripts": {