Baby.zhou
Baby.zhou

Reputation: 561

How kafka consumer choose consume nearest broker?

I deploy a kafka cluster on three hosts.And deploy consumers on the same hosts. How i to let the consumer consume the nearest broker's partitions.for example,host a's consumer just consume the partitions which belong to host a.

Upvotes: 0

Views: 648

Answers (1)

Hans Jespersen
Hans Jespersen

Reputation: 8335

Kafka doesn't work that way. The clients will connect to all three brokers and produce and consume from all three brokers in parallel based on which nodes are currently the leader for each topic partition.

Upvotes: 1

Related Questions