require('./lib/boot/logger');

var defaultConfig = {
  amqpUrl: process.env.AMQP_URL || 'amqp://localhost',
  amqpPrefetch: process.env.AMQP_PREFETCH || 5,
  amqpRequeue: true
};

module.exports = function(config) {
  for (var key in config) {
    if (config.hasOwnProperty(key) && defaultConfig.hasOwnProperty(key)) {
      defaultConfig[key] = config[key];
    }
  }

  defaultConfig.amqpPrefetch = parseInt(defaultConfig.amqpPrefetch) || 5;

  return {
    producer: require('./lib/producer')(defaultConfig),
    consumer: require('./lib/consumer')(defaultConfig)
  };
};

require('./lib/boot/logger');

var defaultConfig = {
  amqpUrl: process.env.AMQP_URL || 'amqp://localhost',
  amqpPrefetch: process.env.AMQP_PREFETCH || 0,
  amqpRequeue: true
};

module.exports = function(config) {
  for (var key in config) {
    if (config.hasOwnProperty(key) && defaultConfig.hasOwnProperty(key)) {
      defaultConfig[key] = config[key];
    }
  }

  defaultConfig.amqpPrefetch = parseInt(defaultConfig.amqpPrefetch);

  return {
    producer: require('./lib/producer')(defaultConfig),
    consumer: require('./lib/consumer')(defaultConfig)
  };
};

--- 
+++ 
@@ -2,7 +2,7 @@
 
 var defaultConfig = {
   amqpUrl: process.env.AMQP_URL || 'amqp://localhost',
-  amqpPrefetch: process.env.AMQP_PREFETCH || 0,
+  amqpPrefetch: process.env.AMQP_PREFETCH || 5,
   amqpRequeue: true
 };
 
@@ -13,7 +13,7 @@
     }
   }
 
-  defaultConfig.amqpPrefetch = parseInt(defaultConfig.amqpPrefetch);
+  defaultConfig.amqpPrefetch = parseInt(defaultConfig.amqpPrefetch) || 5;
 
   return {
     producer: require('./lib/producer')(defaultConfig),
Set the prefetch to 5 if not setted
