KafkaProducer.send() could be blocking

Hi there,

We found that KafkaProducer.send() could be blocking under certain scenario, which contradicts the documentation of Asynchronously send a record to a topic. .

The blocking behavior happens at metadata.awaitUpdate, and can block up to 60 seconds. For example, in case of network connectivity issues, the calling thread could be blocked. And this causes issue as we assume the API is asynchronous according to the documentation.

If updating the implementation is non-trivial, could we at least call out in the documentation that the API may be blocking?


What you say is correct, but you should open a PR to update the JavaDocs or file a Jira ticket for it. – The Confluent Community Forum is not the right place to raise this issue.