Skip to content

Commit

Permalink
fix(consumer): default ResetInvalidOffsets to true
Browse files Browse the repository at this point in the history
A number of people have reported issues with the change in default
behaviour that was introduced in #2252 and the comment for this
configuration value had suggested it would retain the behaviour of
previous Sarama versions. This PR puts the default behaviour back to
resetting to `c.Consumer.Offsets.Initial` when the server returns an out
of range error on a Fetch.

Contributes-to: #2342
  • Loading branch information
dnwe committed Sep 27, 2022
1 parent d0a00ae commit d2ee3e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ func NewConfig() *Config {
c.Consumer.Group.Rebalance.Timeout = 60 * time.Second
c.Consumer.Group.Rebalance.Retry.Max = 4
c.Consumer.Group.Rebalance.Retry.Backoff = 2 * time.Second
c.Consumer.Group.ResetInvalidOffsets = false
c.Consumer.Group.ResetInvalidOffsets = true

c.ClientID = defaultClientID
c.ChannelBufferSize = 256
Expand Down

0 comments on commit d2ee3e1

Please sign in to comment.