From 36aaf2eb0e61d80819fb575091052b2bb4cd9341 Mon Sep 17 00:00:00 2001 From: Georgy Buranov Date: Tue, 27 Nov 2018 16:36:41 -0500 Subject: [PATCH] Fix consuming compacted topic --- consumer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consumer.go b/consumer.go index 33d9d143f..f11144476 100644 --- a/consumer.go +++ b/consumer.go @@ -507,7 +507,7 @@ func (child *partitionConsumer) parseMessages(msgSet *MessageSet) ([]*ConsumerMe } } if len(messages) == 0 { - return nil, ErrIncompleteResponse + child.offset++ } return messages, nil } @@ -531,7 +531,7 @@ func (child *partitionConsumer) parseRecords(batch *RecordBatch) ([]*ConsumerMes child.offset = offset + 1 } if len(messages) == 0 { - child.offset += 1 + child.offset++ } return messages, nil }