From 488dec25d011edb858657467892be8338d90f8bc Mon Sep 17 00:00:00 2001 From: hainenber Date: Wed, 13 Sep 2023 20:19:24 +0700 Subject: [PATCH] fix(loki/kafkatarget): correct sticky balance strategy --- component/loki/source/internal/kafkatarget/target_syncer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/loki/source/internal/kafkatarget/target_syncer.go b/component/loki/source/internal/kafkatarget/target_syncer.go index 027ac5fd7073..0355c6134329 100644 --- a/component/loki/source/internal/kafkatarget/target_syncer.go +++ b/component/loki/source/internal/kafkatarget/target_syncer.go @@ -65,7 +65,7 @@ func NewSyncer( switch cfg.KafkaConfig.Assignor { case sarama.StickyBalanceStrategyName: - config.Consumer.Group.Rebalance.Strategy = sarama.NewBalanceStrategyRange() + config.Consumer.Group.Rebalance.Strategy = sarama.NewBalanceStrategySticky() case sarama.RoundRobinBalanceStrategyName: config.Consumer.Group.Rebalance.Strategy = sarama.NewBalanceStrategyRoundRobin() case sarama.RangeBalanceStrategyName, "":