>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 request. Other than that, your understanding of the producer is correct. Thanks, Neha