Skip to content

Commit

Permalink
feat: change kafka sink default balancer (#2946)
Browse files Browse the repository at this point in the history
Signed-off-by: Song Gao <[email protected]>
  • Loading branch information
Yisaer authored and ngjaying committed Jun 27, 2024
1 parent efacebe commit 72df28d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions extensions/sinks/kafka/ext/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ func (m *kafkaSink) buildKafkaWriter() error {
}
brokers := strings.Split(m.c.Brokers, ",")
w := &kafkago.Writer{
Addr: kafkago.TCP(brokers...),
Topic: m.c.Topic,
Balancer: &kafkago.LeastBytes{},
Addr: kafkago.TCP(brokers...),
Topic: m.c.Topic,
// kafka java-client default balancer
Balancer: &kafkago.Murmur2Balancer{},
Async: false,
AllowAutoTopicCreation: true,
MaxAttempts: m.kc.MaxAttempts,
Expand Down

0 comments on commit 72df28d

Please sign in to comment.