Skip to content

Commit

Permalink
Make kafka eventsource compatible with samara 1.37.0 Addresses #2358 (#…
Browse files Browse the repository at this point in the history
…2359)

Signed-off-by: Nick Palumbo <[email protected]>
Co-authored-by: Nick Palumbo <[email protected]>
  • Loading branch information
Radolumbo and Nick Palumbo authored Dec 17, 2022
1 parent 6c07696 commit 484f17c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Organizations below are **officially** using Argo Events. Please send a PR with
1. [ArthurAI](https://arthur.ai/)
1. [BioBox Analytics](https://biobox.io)
1. [BlackRock](https://www.blackrock.com/)
1. [Bloomberg](https://www.bloomberg.com/)
1. [Canva](https://www.canva.com/)
1. [Carrefour](https://www.carrefour.com/)
1. [Codefresh](https://codefresh.io/)
Expand Down
8 changes: 4 additions & 4 deletions eventsources/sources/kafka/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ func (el *EventListener) consumerGroupConsumer(ctx context.Context, log *zap.Sug

switch kafkaEventSource.ConsumerGroup.RebalanceStrategy {
case "sticky":
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategySticky
config.Consumer.Group.Rebalance.GroupStrategies = []sarama.BalanceStrategy{sarama.BalanceStrategySticky}
case "roundrobin":
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategyRoundRobin
config.Consumer.Group.Rebalance.GroupStrategies = []sarama.BalanceStrategy{sarama.BalanceStrategyRoundRobin}
case "range":
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategyRange
config.Consumer.Group.Rebalance.GroupStrategies = []sarama.BalanceStrategy{sarama.BalanceStrategyRange}
default:
log.Info("Invalid rebalance strategy, using default: range")
config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategyRange
config.Consumer.Group.Rebalance.GroupStrategies = []sarama.BalanceStrategy{sarama.BalanceStrategyRange}
}

consumer := Consumer{
Expand Down

0 comments on commit 484f17c

Please sign in to comment.