Skip to content

Commit d521e0f

Browse files
authored
Run consume logic in a separate thread
2 parents 52b40e9 + e7dc75d commit d521e0f

File tree

7 files changed

+314
-194
lines changed

7 files changed

+314
-194
lines changed

lib/kafka-consumer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ KafkaConsumer.prototype.unsubscribe = function() {
385385
* is fetched.
386386
*/
387387
KafkaConsumer.prototype.consume = function(number, cb) {
388-
var timeoutMs = this._consumeTimeout || DEFAULT_CONSUME_TIME_OUT;
388+
var timeoutMs = this._consumeTimeout !== undefined ? this._consumeTimeout : DEFAULT_CONSUME_TIME_OUT;
389389
var self = this;
390390

391391
if ((number && typeof number === 'number') || (number && cb)) {

0 commit comments

Comments
 (0)