Skip to content

Commit

Permalink
fix(loki/kafkatarget): use new sarama method instead of deprecated ones
Browse files Browse the repository at this point in the history
  • Loading branch information
hainenber committed Sep 13, 2023
1 parent aefd9e4 commit fc643f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions component/loki/source/internal/kafkatarget/target_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ func NewSyncer(

switch cfg.KafkaConfig.Assignor {
case sarama.StickyBalanceStrategyName:
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategySticky
config.Consumer.Group.Rebalance.Strategy = sarama.NewBalanceStrategyRange()
case sarama.RoundRobinBalanceStrategyName:
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategyRoundRobin
config.Consumer.Group.Rebalance.Strategy = sarama.NewBalanceStrategyRoundRobin()
case sarama.RangeBalanceStrategyName, "":
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategyRange
config.Consumer.Group.Rebalance.Strategy = sarama.NewBalanceStrategyRange()
default:
return nil, fmt.Errorf("unrecognized consumer group partition assignor: %s", cfg.KafkaConfig.Assignor)
}
Expand Down

0 comments on commit fc643f1

Please sign in to comment.