>When the producer
>tries to send to the old broker (which is either dead, or a slave now),
>the broker will either not respond, or the response will contain an error
>code.
In this case, the broker sends a response with an error code to the
producer, and then the producer retries the metadata r
Hey Guys,
Correct me if I'm wrong, but I believe in 0.8, the producer uses a
metadata request to get topic/partition mappings from the broker. The
broker then interacts with ZK (rather than having the producer do it using
zk.connect).
In the event that the master for a topic/partition fails, a ne
All apis for 0.8 are documented in
https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol
However, there is no need for a producer to call the metadata api directly.
Our producer client does this for you automatically.
For your first question, if a new broker is added, cu
Thanks for your kindly reply.
From: Jun Rao [mailto:jun...@gmail.com]
Sent: 2013年1月15日 13:53
To: dev@kafka.apache.org; Jun Guo -X (jungu - CIIC at Cisco)
Subject: Re: About kafka 0.8 producer zookeeper-based load balancing on
per-request basis
Basically, we spread partitions among multiple
@kafka.apache.org
Cc: Jun Guo -X (jungu - CIIC at Cisco)
Subject: Re: About kafka 0.8 producer zookeeper-based load balancing on
per-request basis
Than how it achieve zookeeper-based load balance on per-request basis?
You are asking two related but different questions. One is how does load
balancing work
>
>
> Than how it achieve zookeeper-based load balance on per-request basis?
You are asking two related but different questions. One is how does load
balancing work and the other is how does broker discovery works. Jun
explained how load balancing works and how requests are routed to
partitons. I
Basically, we spread partitions among multiple brokers. If a message is
sent without a key, the producer picks a random partition to balance the
load. If a message has a key, the default partitioner hashes the key to one
of the partitions deterministically. Then, the load may not always be
balanced