Skip to content

Commit

Permalink
increment offset on control message
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisPoinsot committed May 25, 2018
1 parent 3c763ff commit 525bef5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,9 @@ func (child *partitionConsumer) parseResponse(response *FetchResponse) ([]*Consu
messages := []*ConsumerMessage{}
for _, records := range block.RecordsSet {
if control, err := records.isControl(); err != nil || control {
if err == nil {
child.offset = records.RecordBatch.FirstOffset + records.RecordBatch.Records[0].OffsetDelta + 1
}
continue
}

Expand Down

0 comments on commit 525bef5

Please sign in to comment.