Skip to content

Commit

Permalink
offset commit: use -1 for RetentionTimeMillis
Browse files Browse the repository at this point in the history
This ensures that we do not expire the offset commit immediately.

I will shortly be converting all of this client to use kmsg.NewXyz
properly.
  • Loading branch information
twmb committed Aug 27, 2021
1 parent c6df11d commit 262afb4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/kgo/consumer_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -2027,10 +2027,11 @@ func (g *groupConsumer) commit(
g.commitDone = commitDone

req := &kmsg.OffsetCommitRequest{
Group: g.cfg.group,
Generation: g.generation,
MemberID: g.memberID,
InstanceID: g.cfg.instanceID,
Group: g.cfg.group,
Generation: g.generation,
MemberID: g.memberID,
InstanceID: g.cfg.instanceID,
RetentionTimeMillis: -1,
}

if ctx.Done() != nil {
Expand Down

0 comments on commit 262afb4

Please sign in to comment.