Hey Jason, The producer on failure initiates a metadata request to refresh its state and should issue subsequent requests to the new leader. The errors that you see should only happen once per topic partition per producer. Let me know if this is not what you see. On the producer end you should see the following info logging -
"Back off for x ms before retrying send. Remaining retries = y" If all the retries of the producer failed, you should see error message below - "Failed to send requests for topics" On 6/23/13 1:45 AM, "Jason Rosenberg" <j...@squareup.com> wrote: >I'm working on trying on having seamless rolling restarts for my kafka >servers, running 0.8. I have it so that each server will be restarted >sequentially. Each server takes itself out of the load balancer (e.g. >sets >a status that the lb will recognize, and then waits more than long enough >for the lb to stop sending meta-data requests to that server). Then I >initiate the shutdown (with controlled.shutdown.enable=true). This seems >to work well, however, I occasionally see warnings like this in the log >from the server, after restart: > >2013-06-23 08:28:46,770 WARN [kafka-request-handler-2] server.KafkaApis - >[KafkaApi-508818741] Produce request with correlation id 7136261 from >client on partition [mytopic,0] failed due to Leader not local for >partition [mytopic,0] on broker 508818741 > >This WARN seems to persistently repeat, until the producer client >initiates >a new meta-data request (e.g. every 10 minutes, by default). However, the >producer doesn't log any errors/exceptions when the server is logging this >WARN. > >What's happening here? Is the message silently being forwarded on to the >correct leader for the partition? Is the message dropped? Are these >WARNS >particularly useful? > >Thanks, > >Jason