Skip to content

Commit

Permalink
fix: support existing deprecated Rebalance.Strategy field usage (#2352)
Browse files Browse the repository at this point in the history
* for config backward compatibility remove the validation that prevented both fields being set and instead rely on precedence which favours the legacy field currently
  • Loading branch information
wathenjiang committed Oct 3, 2022
1 parent 619d4ef commit eaf1def
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions config.go
Expand Up @@ -804,8 +804,6 @@ func (c *Config) Validate() error {
return ConfigurationError("Consumer.Group.Heartbeat.Interval must be < Consumer.Group.Session.Timeout")
case c.Consumer.Group.Rebalance.Strategy == nil && len(c.Consumer.Group.Rebalance.GroupStrategies) == 0:
return ConfigurationError("Consumer.Group.Rebalance.GroupStrategies or Consumer.Group.Rebalance.Strategy must not be empty")
case c.Consumer.Group.Rebalance.Strategy != nil && len(c.Consumer.Group.Rebalance.GroupStrategies) != 0:
return ConfigurationError("Consumer.Group.Rebalance.GroupStrategies and Consumer.Group.Rebalance.Strategy cannot be set at the same time")
case c.Consumer.Group.Rebalance.Timeout <= time.Millisecond:
return ConfigurationError("Consumer.Group.Rebalance.Timeout must be >= 1ms")
case c.Consumer.Group.Rebalance.Retry.Max < 0:
Expand Down

0 comments on commit eaf1def

Please sign in to comment.