0

Kafka consumer has client.rack property to make use of the rack awareness feature and consume from the closest replica, but why producer doesnt have the rack awareness feature.

How to make sure producer connects to an leader in the same data center, or connects to closest replica.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
veeRN
  • 143
  • 1
  • 1
  • 9

1 Answers1

1

A Kafka producer will always write to the leader partition, regardless of what locality it has to the producer.

Its well documented here: enter link description here