From 19008eb3ac503f652fb0922d2fad14cd7f3af66d Mon Sep 17 00:00:00 2001 From: Olivier Bazoud Date: Sat, 3 Dec 2016 00:30:02 +0100 Subject: [PATCH] Fix/commit 0 offset on fresh topic See PR #343 --- lib/highLevelConsumer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/highLevelConsumer.js b/lib/highLevelConsumer.js index c03d2299..11b521bc 100644 --- a/lib/highLevelConsumer.js +++ b/lib/highLevelConsumer.js @@ -537,7 +537,7 @@ function autoCommit (force, cb) { this.committing = false; }.bind(this), this.options.autoCommitIntervalMs); - var commits = this.topicPayloads.filter(function (p) { return p.offset !== 0; }); + var commits = this.topicPayloads.filter(function (p) { return p.offset !== -1; }); if (commits.length) { this.client.sendOffsetCommitRequest(this.options.groupId, commits, cb);