1
1
Fork 0

Add comments

This commit is contained in:
Gleb Goncharov 2023-08-18 19:26:36 +04:00
parent 29320207a4
commit a7affaaad2
1 changed files with 4 additions and 2 deletions

View File

@ -45,8 +45,10 @@ func main() {
// make a writer that produces to topic-A, using the round-robin distribution
addrs := strings.Split(brokers, ",")
w := &kafka.Writer{
Addr: kafka.TCP(addrs...),
Topic: topic,
Addr: kafka.TCP(addrs...),
Topic: topic,
// Use round-robin partitioning to avoid message ordering
// Balancer: &kafka.RoundRobin{},
Balancer: &kafka.Hash{},
}